pub struct CoapServerSession<'a> { /* private fields */ }
Expand description
Representation of a server-side CoAP session.
Trait Implementations§
Source§impl<'a> Clone for CoapServerSession<'a>
impl<'a> Clone for CoapServerSession<'a>
Source§fn clone(&self) -> CoapServerSession<'a>
fn clone(&self) -> CoapServerSession<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for CoapServerSession<'a>
impl<'a> Debug for CoapServerSession<'a>
Source§impl<'a> Drop for CoapServerSession<'a>
impl<'a> Drop for CoapServerSession<'a>
Source§impl<'a> From<CoapServerSession<'a>> for CoapSession<'a>
impl<'a> From<CoapServerSession<'a>> for CoapSession<'a>
Source§fn from(session: CoapServerSession<'a>) -> Self
fn from(session: CoapServerSession<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a, T: CoapSessionCommon<'a>> PartialEq<T> for CoapServerSession<'_>
impl<'a, T: CoapSessionCommon<'a>> PartialEq<T> for CoapServerSession<'_>
impl Eq for CoapServerSession<'_>
Auto Trait Implementations§
impl<'a> Freeze for CoapServerSession<'a>
impl<'a> !RefUnwindSafe for CoapServerSession<'a>
impl<'a> !Send for CoapServerSession<'a>
impl<'a> !Sync for CoapServerSession<'a>
impl<'a> Unpin for CoapServerSession<'a>
impl<'a> !UnwindSafe for CoapServerSession<'a>
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'a, T> CoapSessionCommon<'a> for Twhere
T: CoapSessionCommonInternal<'a>,
impl<'a, T> CoapSessionCommon<'a> for Twhere
T: CoapSessionCommonInternal<'a>,
Source§fn app_data<T: Any>(&self) -> Result<Option<Rc<T>>, SessionGetAppDataError>
fn app_data<T: Any>(&self) -> Result<Option<Rc<T>>, SessionGetAppDataError>
Returns the application specific data stored alongside this session.
Source§fn set_app_data<T: 'static + Any>(&self, value: Option<T>)
fn set_app_data<T: 'static + Any>(&self, value: Option<T>)
Sets the application-specific data stored alongside this session.
Source§fn clear_app_data(&self)
fn clear_app_data(&self)
Clears the application-specific data stored alongside this session.
Source§fn ack_random_factor(&self) -> (u16, u16)
fn ack_random_factor(&self) -> (u16, u16)
Returns the Ack-Random-Factor used by libcoap. Read more
Source§fn set_ack_random_factor(&self, integer_part: u16, fractional_part: u16)
fn set_ack_random_factor(&self, integer_part: u16, fractional_part: u16)
Sets the Ack-Random-Factor used by libcoap.
Source§fn ack_timeout(&self) -> (u16, u16)
fn ack_timeout(&self) -> (u16, u16)
Returns the current value of the Acknowledgement Timeout for this session (in seconds). Read more
Source§fn set_ack_timeout(&self, integer_part: u16, fractional_part: u16)
fn set_ack_timeout(&self, integer_part: u16, fractional_part: u16)
Sets the value of the Acknowledgement Timeout for this session.
Source§fn addr_local(&self) -> SocketAddr
fn addr_local(&self) -> SocketAddr
Returns the local address for this session.
Source§fn addr_remote(&self) -> SocketAddr
fn addr_remote(&self) -> SocketAddr
Returns the remote address for this session.
Source§fn max_retransmit(&self) -> MaxRetransmit
fn max_retransmit(&self) -> MaxRetransmit
Returns the maximum number of retransmissions for this session.
Source§fn set_max_retransmit(&mut self, value: MaxRetransmit)
fn set_max_retransmit(&mut self, value: MaxRetransmit)
Sets the maximum number of retransmissions for this session.
Source§fn proto(&self) -> CoapProtocol
fn proto(&self) -> CoapProtocol
Returns the underlying transport protocol used for this session.
Source§fn psk_identity(&self) -> Option<Box<[u8]>>
fn psk_identity(&self) -> Option<Box<[u8]>>
Returns the current PSK identity for this session.
Source§fn state(&self) -> CoapSessionState
fn state(&self) -> CoapSessionState
Returns the current state of this session.
Source§fn init_token(&self, token: &[u8; 8])
fn init_token(&self, token: &[u8; 8])
Initializes the initial token value used by libcoap for this session. Read more
Source§fn max_pdu_size(&self) -> usize
fn max_pdu_size(&self) -> usize
Returns the maximum size of a PDU for this session.
Source§fn next_message_id(&self) -> CoapMessageId
fn next_message_id(&self) -> CoapMessageId
Returns the next message ID that should be used for this session.
Source§fn new_token(&mut self, token: &mut [u8; 8]) -> usize
fn new_token(&mut self, token: &mut [u8; 8]) -> usize
Returns the next token that should be used for requests.
Source§fn send_ping(&mut self) -> CoapMessageId
fn send_ping(&mut self) -> CoapMessageId
Send a ping message to the remote peer.
Source§fn send<P: Into<CoapMessage>>(
&self,
pdu: P,
) -> Result<CoapMessageId, MessageConversionError>
fn send<P: Into<CoapMessage>>( &self, pdu: P, ) -> Result<CoapMessageId, MessageConversionError>
Send the given message-like object to the peer. Read more
Source§fn send_request(
&self,
req: CoapRequest,
) -> Result<CoapRequestHandle, MessageConversionError>
fn send_request( &self, req: CoapRequest, ) -> Result<CoapRequestHandle, MessageConversionError>
Sends the given CoapRequest, returning a CoapRequestHandle that can be used to poll the
request for completion. Read more
Source§fn poll_handle(&self, handle: &CoapRequestHandle) -> IntoIter<CoapResponse>
fn poll_handle(&self, handle: &CoapRequestHandle) -> IntoIter<CoapResponse>
Polls whether the request for the given handle already has pending responses. Read more
Source§fn is_waiting_for_token(&self, token: &CoapToken) -> bool
fn is_waiting_for_token(&self, token: &CoapToken) -> bool
Returns whether this session waits for the provided token.
Source§fn remove_handle(&self, handle: CoapRequestHandle)
fn remove_handle(&self, handle: CoapRequestHandle)
Stops listening for responses to this request handle. Read more
Source§unsafe fn raw_session_mut(&self) -> *mut coap_session_t
unsafe fn raw_session_mut(&self) -> *mut coap_session_t
Returns a mutable reference to the underlying raw session. Read more
Source§unsafe fn raw_session(&self) -> *const coap_session_t
unsafe fn raw_session(&self) -> *const coap_session_t
Returns a reference to the underlying raw session. Read more