[][src]Enum dsf_core::options::Options

pub enum Options {
    None,
    PubKey(PubKey),
    PeerId(PeerId),
    PrevSig(PrevSig),
    Kind(Kind),
    Name(Name),
    IPv4(SocketAddrV4),
    IPv6(SocketAddrV6),
    Issued(Issued),
    Expiry(Expiry),
    Limit(Limit),
    Metadata(Metadata),
}

D-IoT Optional fields

Variants

None
PubKey(PubKey)
PeerId(PeerId)
PrevSig(PrevSig)
Kind(Kind)
Name(Name)
Issued(Issued)
Expiry(Expiry)
Limit(Limit)
Metadata(Metadata)

Methods

impl Options[src]

pub fn parse_vec(data: &[u8]) -> Result<(Vec<Options>, usize), OptionsError>[src]

Parse a bounded list of options into a vector

pub fn encode_vec(
    options: &[Options],
    data: &mut [u8]
) -> Result<usize, OptionsError>
[src]

Encode a vector of options

impl Options[src]

pub fn name(value: &str) -> Options[src]

pub fn kind(value: &str) -> Options[src]

pub fn prev_sig(value: &Signature) -> Options[src]

pub fn meta(key: &str, value: &str) -> Options[src]

pub fn issued<T>(now: T) -> Options where
    T: Into<DateTime>, 
[src]

pub fn expiry<T>(when: T) -> Options where
    T: Into<DateTime>, 
[src]

pub fn peer_id(id: Id) -> Options[src]

pub fn public_key(public_key: PublicKey) -> Options[src]

pub fn address<T>(address: T) -> Options where
    T: Into<SocketAddr>, 
[src]

pub fn pub_key(public_key: PublicKey) -> Options[src]

Trait Implementations

impl Parse for Options[src]

Parse parses a control option from the given scope

type Output = Options

Output type returned from parsing

type Error = OptionsError

Error type returned on parse error

impl Encode for Options[src]

type Error = OptionsError

Error type returned on parse error

impl From<Metadata> for Options[src]

impl Clone for Options[src]

impl PartialEq<Options> for Options[src]

impl Debug for Options[src]

impl StructuralPartialEq for Options[src]

Auto Trait Implementations

impl Send for Options

impl Sync for Options

impl Unpin for Options

impl UnwindSafe for Options

impl RefUnwindSafe for Options

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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]