Struct sep2_client::pubsub::ClientNotifServer
source · pub struct ClientNotifServer { /* private fields */ }
Available on crate feature
pubsub
only.Expand description
A lightweight IEEE 2030.5 Server for receiving Notification<T>
resources from a server for the subscription / notification mechanism.
Implementations§
source§impl ClientNotifServer
impl ClientNotifServer
sourcepub fn new(addr: impl ToSocketAddrs) -> Result<Self>
pub fn new(addr: impl ToSocketAddrs) -> Result<Self>
Create a new Notification server that listens on the given address
pub fn with_https( self, cert_path: impl AsRef<Path>, pk_path: impl AsRef<Path>, rootca_path: impl AsRef<Path> ) -> Result<Self>
sourcepub fn add<T>(
self,
path: impl Into<String>,
callback: impl RouteCallback<T>
) -> Selfwhere
T: SEResource,
pub fn add<T>( self, path: impl Into<String>, callback: impl RouteCallback<T> ) -> Selfwhere T: SEResource,
Add a route to the server. Given:
- A relative URI of the form “/foo”
- A
Fn
callback accepting aNotification<T>
, where T is the expected [
SEResource`] on the route
The RouteCallback
trait can be implemented on any threadsafe type,
however it is automatically implemented for any applicable ‘Fn’
Auto Trait Implementations§
impl !RefUnwindSafe for ClientNotifServer
impl Send for ClientNotifServer
impl Sync for ClientNotifServer
impl Unpin for ClientNotifServer
impl !UnwindSafe for ClientNotifServer
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
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