pub enum NameComponent {
GenericNameComponent(GenericNameComponent),
ImplicitSha256DigestComponent(ImplicitSha256DigestComponent),
ParametersSha256DigestComponent(ParametersSha256DigestComponent),
KeywordNameComponent(KeywordNameComponent),
SegmentNameComponent(SegmentNameComponent),
ByteOffsetNameComponent(ByteOffsetNameComponent),
VersionNameComponent(VersionNameComponent),
TimestampNameComponent(TimestampNameComponent),
SequenceNumNameComponent(SequenceNumNameComponent),
OtherNameComponent(OtherNameComponent),
}Expand description
A single /-separated piece of a Name, tagged with the TLV type
that says what kind of component it is.
Most components round-trip through a specific wrapper type –
GenericNameComponent for a plain segment, SegmentNameComponent
for a seg= segment number, and so on – so that, for instance, a
VersionNameComponent can’t accidentally be constructed from bytes
that aren’t a valid version number. Any component type this crate
doesn’t know about decodes into OtherNameComponent instead of
failing.
Variants§
GenericNameComponent(GenericNameComponent)
A plain, human-readable component – see GenericNameComponent.
ImplicitSha256DigestComponent(ImplicitSha256DigestComponent)
A SHA-256 digest of the identified Data packet – see ImplicitSha256DigestComponent.
ParametersSha256DigestComponent(ParametersSha256DigestComponent)
A SHA-256 digest of a signed Interest’s application parameters –
see ParametersSha256DigestComponent.
KeywordNameComponent(KeywordNameComponent)
A well-known keyword – see KeywordNameComponent.
SegmentNameComponent(SegmentNameComponent)
A segment number – see SegmentNameComponent.
ByteOffsetNameComponent(ByteOffsetNameComponent)
A byte offset – see ByteOffsetNameComponent.
VersionNameComponent(VersionNameComponent)
A version number – see VersionNameComponent.
TimestampNameComponent(TimestampNameComponent)
A point in time – see TimestampNameComponent.
SequenceNumNameComponent(SequenceNumNameComponent)
A sequence number – see SequenceNumNameComponent.
OtherNameComponent(OtherNameComponent)
Any component type not covered by the variants above – see OtherNameComponent.
Trait Implementations§
Source§impl AsMut<NameComponent> for FinalBlockId
impl AsMut<NameComponent> for FinalBlockId
Source§fn as_mut(&mut self) -> &mut NameComponent
fn as_mut(&mut self) -> &mut NameComponent
Source§impl AsRef<NameComponent> for FinalBlockId
impl AsRef<NameComponent> for FinalBlockId
Source§fn as_ref(&self) -> &NameComponent
fn as_ref(&self) -> &NameComponent
Source§impl Clone for NameComponent
impl Clone for NameComponent
Source§fn clone(&self) -> NameComponent
fn clone(&self) -> NameComponent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NameComponent
impl Debug for NameComponent
impl Eq for NameComponent
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)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl From<ByteOffsetNameComponent> for NameComponent
impl From<ByteOffsetNameComponent> for NameComponent
Source§fn from(original: ByteOffsetNameComponent) -> NameComponent
fn from(original: ByteOffsetNameComponent) -> NameComponent
Source§impl From<FinalBlockId> for NameComponent
impl From<FinalBlockId> for NameComponent
Source§fn from(original: FinalBlockId) -> Self
fn from(original: FinalBlockId) -> Self
Source§impl From<GenericNameComponent> for NameComponent
impl From<GenericNameComponent> for NameComponent
Source§fn from(original: GenericNameComponent) -> NameComponent
fn from(original: GenericNameComponent) -> NameComponent
Source§impl From<ImplicitSha256DigestComponent> for NameComponent
impl From<ImplicitSha256DigestComponent> for NameComponent
Source§fn from(original: ImplicitSha256DigestComponent) -> NameComponent
fn from(original: ImplicitSha256DigestComponent) -> NameComponent
Source§impl From<KeywordNameComponent> for NameComponent
impl From<KeywordNameComponent> for NameComponent
Source§fn from(original: KeywordNameComponent) -> NameComponent
fn from(original: KeywordNameComponent) -> NameComponent
Source§impl From<NameComponent> for FinalBlockId
impl From<NameComponent> for FinalBlockId
Source§fn from(original: NameComponent) -> FinalBlockId
fn from(original: NameComponent) -> FinalBlockId
Source§impl From<NameComponent> for Name
impl From<NameComponent> for Name
Source§fn from(value: NameComponent) -> Self
fn from(value: NameComponent) -> Self
Source§impl From<OtherNameComponent> for NameComponent
impl From<OtherNameComponent> for NameComponent
Source§fn from(original: OtherNameComponent) -> NameComponent
fn from(original: OtherNameComponent) -> NameComponent
Source§impl From<ParametersSha256DigestComponent> for NameComponent
impl From<ParametersSha256DigestComponent> for NameComponent
Source§fn from(original: ParametersSha256DigestComponent) -> NameComponent
fn from(original: ParametersSha256DigestComponent) -> NameComponent
Source§impl From<SegmentNameComponent> for NameComponent
impl From<SegmentNameComponent> for NameComponent
Source§fn from(original: SegmentNameComponent) -> NameComponent
fn from(original: SegmentNameComponent) -> NameComponent
Source§impl From<SequenceNumNameComponent> for NameComponent
impl From<SequenceNumNameComponent> for NameComponent
Source§fn from(original: SequenceNumNameComponent) -> NameComponent
fn from(original: SequenceNumNameComponent) -> NameComponent
Source§impl From<TimestampNameComponent> for NameComponent
impl From<TimestampNameComponent> for NameComponent
Source§fn from(original: TimestampNameComponent) -> NameComponent
fn from(original: TimestampNameComponent) -> NameComponent
Source§impl From<VersionNameComponent> for NameComponent
impl From<VersionNameComponent> for NameComponent
Source§fn from(original: VersionNameComponent) -> NameComponent
fn from(original: VersionNameComponent) -> NameComponent
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
Source§impl Hash for NameComponent
impl Hash for NameComponent
Source§impl Ord for NameComponent
impl Ord for NameComponent
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for NameComponent
impl PartialEq for NameComponent
Source§impl PartialOrd for NameComponent
impl PartialOrd for NameComponent
impl StructuralPartialEq for NameComponent
Source§impl TlvDecode for NameComponent
impl TlvDecode for NameComponent
Auto Trait Implementations§
impl !Freeze for NameComponent
impl RefUnwindSafe for NameComponent
impl Send for NameComponent
impl Sync for NameComponent
impl Unpin for NameComponent
impl UnsafeUnpin for NameComponent
impl UnwindSafe for NameComponent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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