pub struct CoapConfig {
pub enabled: bool,
pub listen_addr: String,
pub dtls_enabled: bool,
pub block_size: u16,
pub max_payload: usize,
pub session_timeout_secs: u64,
pub max_sessions: usize,
}Expand description
[coap] section — CoAP transport for constrained devices.
[coap]
enabled = true
listen_addr = "0.0.0.0:5684"
dtls_enabled = true
block_size = 512
max_payload = 65536
session_timeout_secs = 300
max_sessions = 1024Fields§
§enabled: boolEnable the CoAP transport listener.
listen_addr: StringUDP listen address for CoAP/DTLS.
dtls_enabled: boolEnable DTLS for the CoAP listener.
block_size: u16CoAP block-wise transfer size in bytes (64, 128, 256, 512, 1024).
max_payload: usizeMaximum reassembled payload size in bytes.
session_timeout_secs: u64DTLS session timeout for constrained device resumption.
max_sessions: usizeMaximum number of concurrent DTLS sessions.
Implementations§
Trait Implementations§
Source§impl Clone for CoapConfig
impl Clone for CoapConfig
Source§fn clone(&self) -> CoapConfig
fn clone(&self) -> CoapConfig
Returns a duplicate 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 Debug for CoapConfig
impl Debug for CoapConfig
Source§impl Default for CoapConfig
impl Default for CoapConfig
Source§impl<'de> Deserialize<'de> for CoapConfig
impl<'de> Deserialize<'de> for CoapConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CoapConfig
impl RefUnwindSafe for CoapConfig
impl Send for CoapConfig
impl Sync for CoapConfig
impl Unpin for CoapConfig
impl UnsafeUnpin for CoapConfig
impl UnwindSafe for CoapConfig
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more