pub struct FakeLocalService { /* private fields */ }
Trait Implementations§
Source§impl Drop for FakeLocalService
impl Drop for FakeLocalService
Source§impl LocalService<FakeTypes> for FakeLocalService
impl LocalService<FakeTypes> for FakeLocalService
Source§fn publish(&self) -> <FakeTypes as ServerTypes>::ServiceEventStream
fn publish(&self) -> <FakeTypes as ServerTypes>::ServiceEventStream
Publish the service.
Returns an EventStream providing Events to be processed by the local
service implementation.
Events will only be delivered to one ServiceEventStream at a time.
Calling publish while a previous ServiceEventStream is still active
will return a stream with only Err(AlreadyPublished).
Source§fn notify(&self, characteristic: &Handle, data: &[u8], peers: &[PeerId])
fn notify(&self, characteristic: &Handle, data: &[u8], peers: &[PeerId])
Notify a characteristic.
Leave
peers
empty to notify all peers who have configured
notifications. Peers that have not configured for notifications will
not be notified.Source§fn indicate(
&self,
characteristic: &Handle,
data: &[u8],
peers: &[PeerId],
) -> <FakeTypes as ServerTypes>::IndicateConfirmationStream
fn indicate( &self, characteristic: &Handle, data: &[u8], peers: &[PeerId], ) -> <FakeTypes as ServerTypes>::IndicateConfirmationStream
Indicate on a characteristic.
Leave
peers
empty to notify all peers who have configured
indications. Peers that have not configured for indications will
be skipped. Returns a stream which has items for each peer that
confirms the notification, and terminates when all peers have either
timed out or confirmed.Auto Trait Implementations§
impl Freeze for FakeLocalService
impl !RefUnwindSafe for FakeLocalService
impl Send for FakeLocalService
impl Sync for FakeLocalService
impl Unpin for FakeLocalService
impl !UnwindSafe for FakeLocalService
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