pub struct Notifier<T, P>{ /* private fields */ }Expand description
Notifier implemented over an owned native-frame transport.
Implementations§
Source§impl<T, P> Notifier<T, P>
impl<T, P> Notifier<T, P>
Sourcepub fn new(transport: Arc<T>, uri_provider: Arc<P>) -> Self
pub fn new(transport: Arc<T>, uri_provider: Arc<P>) -> Self
Creates a notifier over an owned native-frame transport.
Sourcepub async fn notify(
&self,
resource_id: u16,
destination: &UUri,
call_options: CallOptions,
payload: Option<UPayload>,
) -> Result<(), NotificationError>
pub async fn notify( &self, resource_id: u16, destination: &UUri, call_options: CallOptions, payload: Option<UPayload>, ) -> Result<(), NotificationError>
Sends an owned native-frame notification.
Sourcepub async fn start_listening(
&self,
topic: &UUri,
listener: Arc<dyn UListener>,
) -> Result<(), RegistrationError>
pub async fn start_listening( &self, topic: &UUri, listener: Arc<dyn UListener>, ) -> Result<(), RegistrationError>
Starts listening for owned native-frame notifications on a topic.
Sourcepub async fn stop_listening(
&self,
topic: &UUri,
listener: Arc<dyn UListener>,
) -> Result<(), RegistrationError>
pub async fn stop_listening( &self, topic: &UUri, listener: Arc<dyn UListener>, ) -> Result<(), RegistrationError>
Stops listening for owned native-frame notifications on a topic.
Trait Implementations§
Source§impl<T, P> Notifier for Notifier<T, P>
impl<T, P> Notifier for Notifier<T, P>
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<T, P> !Freeze for Notifier<T, P>
impl<T, P> !RefUnwindSafe for Notifier<T, P>
impl<T, P> Send for Notifier<T, P>
impl<T, P> Sync for Notifier<T, P>
impl<T, P> Unpin for Notifier<T, P>
impl<T, P> !UnwindSafe for Notifier<T, P>
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<TCore> UWithNativePrefixWire for TCore
impl<TCore> UWithNativePrefixWire for TCore
Source§fn into_native_prefix_wire_transport<W>(
self,
wire: W,
) -> UWireTransport<TCore, W, NativePrefixFrameMetadataCodec>where
W: UWire,
fn into_native_prefix_wire_transport<W>(
self,
wire: W,
) -> UWireTransport<TCore, W, NativePrefixFrameMetadataCodec>where
W: UWire,
Wraps this core with an external or custom selected wire using canonical metadata.
Source§fn into_protobuf_transport(
self,
) -> UWireTransport<TCore, ProtobufWire, NativePrefixFrameMetadataCodec>
fn into_protobuf_transport( self, ) -> UWireTransport<TCore, ProtobufWire, NativePrefixFrameMetadataCodec>
Wraps this core with the Protocol Buffers selected-wire profile.
Source§fn into_stable_container_transport(
self,
) -> UWireTransport<TCore, StableContainerWireFormat, NativePrefixFrameMetadataCodec>
fn into_stable_container_transport( self, ) -> UWireTransport<TCore, StableContainerWireFormat, NativePrefixFrameMetadataCodec>
Wraps this core with the stable-container selected-wire profile.