pub struct Name {
pub components: Vec<NameComponent>,
}
Fields§
§components: Vec<NameComponent>
Implementations§
Source§impl Name
impl Name
pub const fn empty() -> Self
pub fn from_str(s: &str) -> Result<Self>
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
pub fn remove_prefix(&mut 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 PartialOrd for Name
impl PartialOrd for Name
Source§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_critical
impl Eq for Name
impl StructuralPartialEq for Name
Auto Trait Implementations§
impl Freeze for Name
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more