pub struct SimpleNotifier { /* private fields */ }
Expand description
A Notifier
that uses the uProtocol Transport Layer API to send and receive
notifications to/from (other) uEntities.
Implementations§
Source§impl SimpleNotifier
impl SimpleNotifier
Sourcepub fn new(
transport: Arc<dyn UTransport>,
uri_provider: Arc<dyn LocalUriProvider>,
) -> Self
pub fn new( transport: Arc<dyn UTransport>, uri_provider: Arc<dyn LocalUriProvider>, ) -> Self
Creates a new Notifier for a given transport.
§Arguments
transport
- The uProtocol Transport Layer implementation to use for sending and receiving notification messages.uri_provider
- The helper for creating URIs that represent local resources.
Trait Implementations§
Source§impl Notifier for SimpleNotifier
impl Notifier for SimpleNotifier
Source§fn notify<'life0, 'life1, 'async_trait>(
&'life0 self,
resource_id: u16,
destination: &'life1 UUri,
call_options: CallOptions,
payload: Option<UPayload>,
) -> Pin<Box<dyn Future<Output = Result<(), NotificationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn notify<'life0, 'life1, 'async_trait>(
&'life0 self,
resource_id: u16,
destination: &'life1 UUri,
call_options: CallOptions,
payload: Option<UPayload>,
) -> Pin<Box<dyn Future<Output = Result<(), NotificationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sends a notification to a uEntity. Read more
Source§fn start_listening<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 UUri,
listener: Arc<dyn UListener>,
) -> Pin<Box<dyn Future<Output = Result<(), RegistrationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn start_listening<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 UUri,
listener: Arc<dyn UListener>,
) -> Pin<Box<dyn Future<Output = Result<(), RegistrationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Starts listening to a notification topic. Read more
Source§fn stop_listening<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 UUri,
listener: Arc<dyn UListener>,
) -> Pin<Box<dyn Future<Output = Result<(), RegistrationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stop_listening<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 UUri,
listener: Arc<dyn UListener>,
) -> Pin<Box<dyn Future<Output = Result<(), RegistrationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deregisters a previously registered handler for listening to notifications. Read more
Auto Trait Implementations§
impl Freeze for SimpleNotifier
impl !RefUnwindSafe for SimpleNotifier
impl Send for SimpleNotifier
impl Sync for SimpleNotifier
impl Unpin for SimpleNotifier
impl !UnwindSafe for SimpleNotifier
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