pub enum CoapOption {
Show 27 variants
IfMatch(CoapMatch),
IfNoneMatch,
UriHost(UriHost),
UriPort(UriPort),
UriPath(UriPath),
UriQuery(UriQuery),
LocationPath(UriPath),
LocationQuery(UriQuery),
ProxyUri(ProxyUri),
ProxyScheme(ProxyScheme),
ContentFormat(ContentFormat),
Accept(ContentFormat),
Size1(Size),
Size2(Size),
Block1(Block),
Block2(Block),
HopLimit(HopLimit),
NoResponse(NoResponse),
ETag(ETag),
MaxAge(MaxAge),
Observe(Observe),
Oscore(Oscore),
Echo(Echo),
RTag(RequestTag),
QBlock1(Block),
QBlock2(Block),
Other(CoapOptionNum, Box<[u8]>),
}
Expand description
Representation of a CoAP option including its value.
For an enum describing the possible option types (and their associated option numbers), see CoapOptionType, for the data type representing option numbers, see CoapOptionNum
Variants§
IfMatch(CoapMatch)
IfNoneMatch
UriHost(UriHost)
UriPort(UriPort)
UriPath(UriPath)
UriQuery(UriQuery)
LocationPath(UriPath)
LocationQuery(UriQuery)
ProxyUri(ProxyUri)
ProxyScheme(ProxyScheme)
ContentFormat(ContentFormat)
Accept(ContentFormat)
Size1(Size)
Size2(Size)
Block1(Block)
Block2(Block)
HopLimit(HopLimit)
NoResponse(NoResponse)
ETag(ETag)
MaxAge(MaxAge)
Observe(Observe)
Oscore(Oscore)
Echo(Echo)
RTag(RequestTag)
QBlock1(Block)
QBlock2(Block)
Other(CoapOptionNum, Box<[u8]>)
Implementations§
Source§impl CoapOption
impl CoapOption
Sourcepub fn number(&self) -> CoapOptionNum
pub fn number(&self) -> CoapOptionNum
Returns the option number associated with this option.
Sourcepub fn into_value_bytes(self) -> Result<Box<[u8]>, OptionValueError>
pub fn into_value_bytes(self) -> Result<Box<[u8]>, OptionValueError>
Converts the option into a Box<[u8]>
containing the value bytes.
Trait Implementations§
Source§impl Clone for CoapOption
impl Clone for CoapOption
Source§fn clone(&self) -> CoapOption
fn clone(&self) -> CoapOption
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 Debug for CoapOption
impl Debug for CoapOption
Source§impl Hash for CoapOption
impl Hash for CoapOption
Source§impl PartialEq for CoapOption
impl PartialEq for CoapOption
impl Eq for CoapOption
impl StructuralPartialEq for CoapOption
Auto Trait Implementations§
impl Freeze for CoapOption
impl RefUnwindSafe for CoapOption
impl Send for CoapOption
impl Sync for CoapOption
impl Unpin for CoapOption
impl UnwindSafe for CoapOption
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