ControlParameters

Struct ControlParameters 

Source
pub struct ControlParameters {
Show 14 fields pub name: Option<Name>, pub face_id: Option<u64>, pub uri: Option<String>, pub local_uri: Option<String>, pub origin: Option<u64>, pub cost: Option<u64>, pub flags: Option<u64>, pub mask: Option<u64>, pub expiration_period: Option<u64>, pub face_persistency: Option<u64>, pub strategy: Option<Name>, pub mtu: Option<u64>, pub capacity: Option<u64>, pub count: Option<u64>,
}
Expand description

NFD ControlParameters — all fields optional.

Fields§

§name: Option<Name>§face_id: Option<u64>§uri: Option<String>§local_uri: Option<String>§origin: Option<u64>§cost: Option<u64>§flags: Option<u64>§mask: Option<u64>§expiration_period: Option<u64>§face_persistency: Option<u64>§strategy: Option<Name>§mtu: Option<u64>§capacity: Option<u64>§count: Option<u64>

Implementations§

Source§

impl ControlParameters

Source

pub fn new() -> Self

Source

pub fn encode(&self) -> Bytes

Encode to wire format as a complete ControlParameters TLV (type 0x68).

Source

pub fn encode_value(&self) -> Bytes

Encode the inner fields (without the outer 0x68 wrapper). Useful for embedding in a name component.

Source

pub fn decode(wire: Bytes) -> Result<Self, ControlParametersError>

Decode from a complete ControlParameters TLV (type 0x68).

Source

pub fn decode_value(value: Bytes) -> Result<Self, ControlParametersError>

Decode from the inner value bytes (without the outer 0x68 wrapper).

Trait Implementations§

Source§

impl Clone for ControlParameters

Source§

fn clone(&self) -> ControlParameters

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ControlParameters

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ControlParameters

Source§

fn default() -> ControlParameters

Returns the “default value” for a type. Read more
Source§

impl PartialEq for ControlParameters

Source§

fn eq(&self, other: &ControlParameters) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for ControlParameters

Source§

impl StructuralPartialEq for ControlParameters

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.