pub struct WorkThread { /* private fields */ }Implementations§
Source§impl WorkThread
impl WorkThread
pub fn spawn() -> Self
pub fn join(&self) -> Result<(), Error>
pub async fn get_hosts(&self) -> Result<Vec<HostInfo>, Error>
pub async fn get_peer_id(&self, address: &CStr) -> Result<PeerId, Error>
pub async fn get_known_peers(&self) -> Result<Vec<Peer>, Error>
pub async fn connect_peer(&self, peer_id: PeerId) -> Result<(), Error>
pub async fn disconnect_peer(&self, peer_id: PeerId) -> Result<(), Error>
pub async fn pair( &self, peer_id: PeerId, options: PairingOptions, ) -> Result<(), Error>
pub async fn start_pairing_delegate( &self, input_cap: InputCapability, output_cap: OutputCapability, ) -> Result<(), Error>
pub async fn stop_pairing_delegate(&self) -> bool
pub async fn forget_peer(&self, peer_id: PeerId) -> Result<(), Error>
pub async fn connect_l2cap_channel( &self, peer_id: PeerId, psm: u16, ) -> Result<(), Error>
pub async fn disconnect_l2cap(&self) -> Result<(), Error>
pub async fn write_l2cap(&self, data: Vec<u8>) -> Result<(), Error>
pub async fn set_discovery(&self, discovery: bool) -> Result<(), Error>
pub async fn set_discoverability(&self, discoverable: bool) -> Result<(), Error>
pub async fn set_connectability(&self, connectable: bool) -> Result<(), Error>
pub async fn set_local_name(&self, name: String) -> Result<(), Error>
pub async fn set_device_class( &self, device_class: DeviceClass, ) -> Result<(), Error>
pub async fn start_le_scan( &self, ) -> Result<UnboundedReceiver<Vec<(Peer, Option<Address>)>>, Error>
pub async fn stop_le_scan(&self) -> bool
pub async fn connect_le(&self, peer_id: PeerId) -> Result<(), Error>
pub async fn advertise_peripheral( &self, parameters: AdvertisingParameters, timeout: Duration, ) -> Result<Option<PeerId>, Error>
pub async fn publish_service( &self, uuid: Uuid, service_handle: ServiceHandle, characteristics: Vec<Characteristic>, ) -> Result<(), Error>
pub async fn discover_services(&self) -> Result<Vec<ServiceInfo>, Error>
pub async fn read_characteristic( &self, service_handle: ServiceHandle, characteristic_handle: Handle, ) -> Result<ReadValue, Error>
pub async fn register_characteristic_notifier( &self, service_handle: ServiceHandle, characteristic_handle: Handle, ) -> Result<(), Error>
pub async fn advertise_service( &self, psm: u16, timeout: Duration, ) -> Result<Option<PeerId>, Error>
Auto Trait Implementations§
impl !Freeze for WorkThread
impl !RefUnwindSafe for WorkThread
impl Send for WorkThread
impl Sync for WorkThread
impl Unpin for WorkThread
impl UnsafeUnpin for WorkThread
impl !UnwindSafe for WorkThread
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]§impl<T> IntoAny for T
impl<T> IntoAny for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more