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
impl ControlParameters
pub fn new() -> Self
Sourcepub fn encode(&self) -> Bytes
pub fn encode(&self) -> Bytes
Encode to wire format as a complete ControlParameters TLV (type 0x68).
Sourcepub fn encode_value(&self) -> Bytes
pub fn encode_value(&self) -> Bytes
Encode the inner fields (without the outer 0x68 wrapper). Useful for embedding in a name component.
Sourcepub fn decode(wire: Bytes) -> Result<Self, ControlParametersError>
pub fn decode(wire: Bytes) -> Result<Self, ControlParametersError>
Decode from a complete ControlParameters TLV (type 0x68).
Sourcepub fn decode_value(value: Bytes) -> Result<Self, ControlParametersError>
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
impl Clone for ControlParameters
Source§fn clone(&self) -> ControlParameters
fn clone(&self) -> ControlParameters
Returns a duplicate 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 ControlParameters
impl Debug for ControlParameters
Source§impl Default for ControlParameters
impl Default for ControlParameters
Source§fn default() -> ControlParameters
fn default() -> ControlParameters
Returns the “default value” for a type. Read more
Source§impl PartialEq for ControlParameters
impl PartialEq for ControlParameters
impl Eq for ControlParameters
impl StructuralPartialEq for ControlParameters
Auto Trait Implementations§
impl !Freeze for ControlParameters
impl RefUnwindSafe for ControlParameters
impl Send for ControlParameters
impl Sync for ControlParameters
impl Unpin for ControlParameters
impl UnwindSafe for ControlParameters
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
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
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
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
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.