Struct ndn_protocol::Name
source · pub struct Name {
pub components: Vec<NameComponent>,
}Fields§
§components: Vec<NameComponent>Implementations§
source§impl Name
impl Name
pub fn from_str(s: &str) -> Result<Self, NdnError>
pub fn to_uri(&self) -> Url
pub fn iter(&self) -> impl Iterator<Item = &NameComponent>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut NameComponent>
pub fn into_iter(self) -> impl Iterator<Item = NameComponent>
pub fn join<T: TryInto<Self>>(&self, other: T) -> Self
pub fn has_prefix(&self, prefix: &Name) -> bool
Trait Implementations§
source§impl Extend<NameComponent> for Name
impl Extend<NameComponent> for Name
source§fn extend<T: IntoIterator<Item = NameComponent>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = NameComponent>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl From<NameComponent> for Name
impl From<NameComponent> for Name
source§fn from(value: NameComponent) -> Self
fn from(value: NameComponent) -> Self
Converts to this type from the input type.
source§impl FromIterator<NameComponent> for Name
impl FromIterator<NameComponent> for Name
source§fn from_iter<T: IntoIterator<Item = NameComponent>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = NameComponent>>(iter: T) -> Self
Creates a value from an iterator. Read more
source§impl Ord for Name
impl Ord for Name
source§impl PartialEq for Name
impl PartialEq for Name
source§impl PartialOrd for Name
impl PartialOrd for Name
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Tlv for Name
impl Tlv for Name
source§fn inner_size(&self) -> usize
fn inner_size(&self) -> usize
The size of the payload contained within this TLV Read more
source§fn critical() -> bool
fn critical() -> bool
Whether the TLV is critical, see
tlv_criticalimpl Eq for Name
impl StructuralPartialEq for Name
Auto Trait Implementations§
impl RefUnwindSafe for Name
impl Send for Name
impl Sync for Name
impl Unpin for Name
impl UnwindSafe for Name
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