pub struct Server { /* private fields */ }
Implementations§
source§impl Server
impl Server
sourcepub fn new_udp<A: ToSocketAddrs>(addr: A) -> Result<Self, Error>
pub fn new_udp<A: ToSocketAddrs>(addr: A) -> Result<Self, Error>
Creates a CoAP server listening on the given address.
pub fn from_listeners(listeners: Vec<Box<dyn Listener>>) -> Self
sourcepub async fn run<Handler: RequestHandler>(
self,
handler: Handler,
) -> Result<(), Error>
pub async fn run<Handler: RequestHandler>( self, handler: Handler, ) -> Result<(), Error>
run the server.
sourcepub async fn disable_observe_handling(&mut self, value: bool)
pub async fn disable_observe_handling(&mut self, value: bool)
disable auto-observe handling in server
Auto Trait Implementations§
impl Freeze for Server
impl !RefUnwindSafe for Server
impl Send for Server
impl !Sync for Server
impl Unpin for Server
impl !UnwindSafe for Server
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