pub enum ManifestFacet {
Content,
Governance,
Membership,
Children,
Named(String),
}Expand description
The four uniform spool facets from weft #358, plus an open named tail.
Named keeps the set genuinely open — the substrate treats a facet as a
token. A Named token that spells a well-known facet normalizes to it, so
the two spellings can never diverge in a content hash.
Variants§
Implementations§
Source§impl ManifestFacet
impl ManifestFacet
Sourcepub fn token(&self) -> &str
pub fn token(&self) -> &str
The facet token as it appears in canonical bytes, scope tokens, and ref names.
Sourcepub fn parse(
token: impl AsRef<str>,
) -> Result<ManifestFacet, ManifestFacetParseError>
pub fn parse( token: impl AsRef<str>, ) -> Result<ManifestFacet, ManifestFacetParseError>
Parse a token, normalizing the four well-known spellings.
Sourcepub fn well_known() -> [ManifestFacet; 4]
pub fn well_known() -> [ManifestFacet; 4]
The four facets every spool carries, per weft #358.
Trait Implementations§
Source§impl Clone for ManifestFacet
impl Clone for ManifestFacet
Source§fn clone(&self) -> ManifestFacet
fn clone(&self) -> ManifestFacet
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ManifestFacet
impl Debug for ManifestFacet
Source§impl Display for ManifestFacet
impl Display for ManifestFacet
impl Eq for ManifestFacet
Source§impl Hash for ManifestFacet
impl Hash for ManifestFacet
Source§impl Ord for ManifestFacet
impl Ord for ManifestFacet
Source§fn cmp(&self, other: &ManifestFacet) -> Ordering
fn cmp(&self, other: &ManifestFacet) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ManifestFacet
impl PartialEq for ManifestFacet
Source§impl PartialOrd for ManifestFacet
impl PartialOrd for ManifestFacet
impl StructuralPartialEq for ManifestFacet
Auto Trait Implementations§
impl Freeze for ManifestFacet
impl RefUnwindSafe for ManifestFacet
impl Send for ManifestFacet
impl Sync for ManifestFacet
impl Unpin for ManifestFacet
impl UnsafeUnpin for ManifestFacet
impl UnwindSafe for ManifestFacet
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