Enum libcoap_rs::message::CoapOption
source · pub enum CoapOption {
Show 22 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),
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)
Other(CoapOptionNum, Box<[u8]>)
Implementations
sourceimpl 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
sourceimpl Clone for CoapOption
impl Clone for CoapOption
sourcefn clone(&self) -> CoapOption
fn clone(&self) -> CoapOption
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for CoapOption
impl Debug for CoapOption
sourceimpl Hash for CoapOption
impl Hash for CoapOption
sourceimpl PartialEq<CoapOption> for CoapOption
impl PartialEq<CoapOption> for CoapOption
sourcefn eq(&self, other: &CoapOption) -> bool
fn eq(&self, other: &CoapOption) -> bool
impl Eq for CoapOption
impl StructuralEq for CoapOption
impl StructuralPartialEq for CoapOption
Auto Trait Implementations
impl RefUnwindSafe for CoapOption
impl Send for CoapOption
impl Sync for CoapOption
impl Unpin for CoapOption
impl UnwindSafe for CoapOption
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more