Skip to main content

Module name

Module name 

Source
Expand description

Name, the hierarchical name every NDN packet is addressed by, and NameComponent, the individual /-separated pieces a name is made of.

A name component isn’t just bytes – its TLV type says what kind of component it is (a plain segment, a version number, an embedded digest, and so on), and NameComponent wraps one such typed component. Most application code only needs GenericNameComponent (a plain, human-readable segment) and Name::from_str/Name::to_uri to move between names and their ndn:/a/b/c-style URI form.

Structs§

ByteOffsetNameComponent
A name component identifying a byte offset into a larger piece of content, written as off=<number> in a name’s URI form.
GenericNameComponent
A plain, human-readable name component – the common case, e.g. each of hello, world, and asd in /hello/world/asd.
ImplicitSha256DigestComponent
A name component holding the SHA-256 digest of the Data packet it identifies. Always the last component of a fully-specified name, written as sha256digest=<hex> in a name’s URI form.
KeywordNameComponent
A name component holding a well-known keyword rather than arbitrary data, written as 32=<keyword> in a name’s URI form.
Name
A hierarchical NDN name: an ordered sequence of NameComponents.
OtherNameComponent
A name component of a type this crate doesn’t have a dedicated wrapper for, kept as its raw TLV type, length, and value.
ParametersSha256DigestComponent
A name component holding the SHA-256 digest of a signed Interest’s application parameters and signature, appended automatically when signing (see Interest::sign). Written as params-sha256=<hex> in a name’s URI form.
SegmentNameComponent
A name component identifying one segment of content split across several Data packets, written as seg=<number> in a name’s URI form.
SequenceNumNameComponent
A name component holding a sequence number, written as seq=<number> in a name’s URI form.
TimestampNameComponent
A name component holding a point in time (Unix time in milliseconds), written as t=<number> in a name’s URI form.
VersionNameComponent
A name component identifying a specific version of otherwise identically-named content, written as v=<number> in a name’s URI form.

Enums§

NameComponent
A single /-separated piece of a Name, tagged with the TLV type that says what kind of component it is.