[][src]Struct async_coap::option::OptionNumber

pub struct OptionNumber(pub u16);

Type representing a CoAP option number.

Methods

impl OptionNumber[src]

pub const IF_MATCH: OptionNumber[src]

IF_MATCH option.

pub const URI_HOST: OptionNumber[src]

URI_HOST option.

pub const ETAG: OptionNumber[src]

ETAG option.

pub const IF_NONE_MATCH: OptionNumber[src]

IF_NONE_MATCH option.

pub const OBSERVE: OptionNumber[src]

OBSERVE option.

pub const URI_PORT: OptionNumber[src]

URI_PORT option.

pub const LOCATION_PATH: OptionNumber[src]

LOCATION_PATH option.

pub const OSCORE: OptionNumber[src]

OSCORE option.

pub const URI_PATH: OptionNumber[src]

URI_PATH option.

pub const CONTENT_FORMAT: OptionNumber[src]

CONTENT_FORMAT option.

pub const MAX_AGE: OptionNumber[src]

MAX_AGE option.

pub const URI_QUERY: OptionNumber[src]

URI_QUERY option.

pub const ACCEPT: OptionNumber[src]

ACCEPT option.

pub const LOCATION_QUERY: OptionNumber[src]

LOCATION_QUERY option.

pub const BLOCK2: OptionNumber[src]

BLOCK2 option.

pub const BLOCK1: OptionNumber[src]

BLOCK1 option.

pub const SIZE2: OptionNumber[src]

SIZE2 option.

pub const PROXY_URI: OptionNumber[src]

PROXY_URI option.

pub const PROXY_SCHEME: OptionNumber[src]

PROXY_SCHEME option.

pub const SIZE1: OptionNumber[src]

SIZE1 option.

pub const NO_RESPONSE: OptionNumber[src]

NO_RESPONSE option.

pub fn is_critical(self) -> bool[src]

Returns true if this option number is critical, false if it is optional.

pub fn is_un_safe(self) -> bool[src]

Returns true if this option is "un-safe".

pub fn is_no_cache_key(self) -> bool[src]

Returns true if this option is a "no-cache-key" option.

pub fn option_value_type(self) -> OptionValueType[src]

Returns the expected value type for this option number.

pub fn is_ok_in_request(self) -> bool[src]

Returns true if this option is allowed in requests, false if it is prohibited in requests.

pub fn is_ok_in_response(self) -> bool[src]

Returns true if this option is allowed in responses, false if it is prohibited in responses.

pub fn is_repeatable(self) -> bool[src]

Returns true if multiple instances of this option are allowed, false if only one instance is allowed.

pub fn static_name(self) -> Option<&'static str>[src]

Attempts to return a Some(&'static str) containing the name of the option.

If the option number isn't recognized, this method returns None.

pub fn fmt_with_value(self, f: &mut Formatter, value: &[u8]) -> Result[src]

Writes out the name of this option along with a text debugging description of the value associated with this option.

Trait Implementations

impl Ord for OptionNumber[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialOrd<OptionNumber> for OptionNumber[src]

impl PartialOrd<u16> for OptionNumber[src]

#[must_use] fn lt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use] fn le(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use] fn gt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use] fn ge(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq<OptionNumber> for OptionNumber[src]

impl PartialEq<u16> for OptionNumber[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Default for OptionNumber[src]

impl Clone for OptionNumber[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Eq for OptionNumber[src]

impl Copy for OptionNumber[src]

impl Display for OptionNumber[src]

impl Debug for OptionNumber[src]

impl Add<u16> for OptionNumber[src]

type Output = Self

The resulting type after applying the + operator.

impl Sub<OptionNumber> for OptionNumber[src]

type Output = u16

The resulting type after applying the - operator.

impl Hash for OptionNumber[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,