pub struct Observer { /* private fields */ }
Implementations§
source§impl Observer
impl Observer
sourcepub fn select_next_some(&mut self) -> SelectNextSome<'_, Fuse<IntervalStream>>
pub fn select_next_some(&mut self) -> SelectNextSome<'_, Fuse<IntervalStream>>
poll the observer’s timer.
sourcepub async fn request_handler(
&mut self,
request: &mut CoapRequest<SocketAddr>,
responder: Arc<dyn Responder>
) -> bool
pub async fn request_handler( &mut self, request: &mut CoapRequest<SocketAddr>, responder: Arc<dyn Responder> ) -> bool
filter the requests belong to the observer. store the responder in case it is needed returns whether the request should be forwarded to the handler
sourcepub async fn timer_handler(&mut self)
pub async fn timer_handler(&mut self)
trigger send the unacknowledge messages.
Auto Trait Implementations§
impl Freeze for Observer
impl !RefUnwindSafe for Observer
impl Send for Observer
impl Sync for Observer
impl Unpin for Observer
impl !UnwindSafe for Observer
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§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