Struct coap_lite::Subject [−][src]
Keeps track of the state of the observed resources.
Implementations
impl<Endpoint: Display + PartialEq + Clone> Subject<Endpoint>[src]
pub fn register(&mut self, request: &CoapRequest<Endpoint>)[src]
Registers an observer interested in a resource.
pub fn deregister(&mut self, request: &CoapRequest<Endpoint>)[src]
pub fn resource_changed(&mut self, resource: &str)[src]
Updates the resource information after having notified the observers.
It increments the resource sequence and counter of unacknowledged updates.
pub fn acknowledge(&mut self, request: &CoapRequest<Endpoint>)[src]
Resets the counter of unacknowledged updates for a resource observer.
pub fn get_resource(&self, resource: &str) -> Option<&Resource<Endpoint>>[src]
Gets the tracked resources.
pub fn get_resource_observers(
&self,
resource: &str
) -> Option<Vec<&Observer<Endpoint>>>[src]
&self,
resource: &str
) -> Option<Vec<&Observer<Endpoint>>>
Gets the observers of a resource.
pub fn set_unacknowledged_limit(&mut self, limit: u8)[src]
Sets the limit of unacknowledged updates before removing an observer.
Trait Implementations
Auto Trait Implementations
impl<Endpoint> RefUnwindSafe for Subject<Endpoint> where
Endpoint: RefUnwindSafe, [src]
Endpoint: RefUnwindSafe,
impl<Endpoint> Send for Subject<Endpoint> where
Endpoint: Send, [src]
Endpoint: Send,
impl<Endpoint> Sync for Subject<Endpoint> where
Endpoint: Sync, [src]
Endpoint: Sync,
impl<Endpoint> Unpin for Subject<Endpoint> where
Endpoint: Unpin, [src]
Endpoint: Unpin,
impl<Endpoint> UnwindSafe for Subject<Endpoint> where
Endpoint: RefUnwindSafe + UnwindSafe, [src]
Endpoint: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,