Skip to main content

MatterCode

Enum MatterCode 

Source
pub enum MatterCode {
Show 110 variants Ed25519Seed, Ed25519N, X25519, Ed25519, Blake3_256, Blake2b_256, Blake2s_256, SHA3_256, SHA2_256, ECDSA256k1Seed, Ed448Seed, X448, Short, Big, X25519Private, X25519CipherSeed, ECDSA256r1Seed, Tall, Large, Great, Vast, Label1, Label2, Tag3, Tag7, Tag11, Salt256, Salt128, Ed25519Sig, ECDSA256k1Sig, Blake3_512, Blake2b_512, SHA3_512, SHA2_512, Long, ECDSA256r1Sig, Tag1, Tag2, Tag5, Tag6, Tag9, Tag10, GramHeadNeck, GramHead, GramHeadAIDNeck, GramHeadAID, ECDSA256k1N, ECDSA256k1, Ed448N, Ed448, Ed448Sig, Tag4, DateTime, X25519CipherSalt, ECDSA256r1N, ECDSA256r1, Null, No, Yes, Tag8, Escape, Empty, TBD0S, TBD0, TBD1S, TBD1, TBD2S, TBD2, StrB64_L0, StrB64_L1, StrB64_L2, StrB64Big_L0, StrB64Big_L1, StrB64Big_L2, Bytes_L0, Bytes_L1, Bytes_L2, BytesBig_L0, BytesBig_L1, BytesBig_L2, X25519Cipher_L0, X25519Cipher_L1, X25519Cipher_L2, X25519CipherBig_L0, X25519CipherBig_L1, X25519CipherBig_L2, X25519CipherQB64_L0, X25519CipherQB64_L1, X25519CipherQB64_L2, X25519CipherQB64Big_L0, X25519CipherQB64Big_L1, X25519CipherQB64Big_L2, X25519CipherQB2_L0, X25519CipherQB2_L1, X25519CipherQB2_L2, X25519CipherQB2Big_L0, X25519CipherQB2Big_L1, X25519CipherQB2Big_L2, HPKEBaseCipher_L0, HPKEBaseCipher_L1, HPKEBaseCipher_L2, HPKEBaseCipherBig_L0, HPKEBaseCipherBig_L1, HPKEBaseCipherBig_L2, Decimal_L0, Decimal_L1, Decimal_L2, DecimalBig_L0, DecimalBig_L1, DecimalBig_L2,
}
Available on crate feature core only.
Expand description

All Matter CESR primitive codes as a single untyped enum.

Each variant maps to a unique Base64 code string via #[strum(serialize = "...")]. For typed access to specific subsets use DigestCode, VerKeyCode, etc.

Variants§

§

Ed25519Seed

Ed25519 256-bit random seed for a private key (A).

§

Ed25519N

Ed25519 verification key, non-transferable basic derivation (B).

§

X25519

X25519 public encryption key, may be converted from Ed25519 or Ed25519N (C).

§

Ed25519

Ed25519 verification key, basic derivation (D).

§

Blake3_256

BLAKE3 256-bit digest, self-addressing derivation (E).

§

Blake2b_256

BLAKE2b 256-bit digest, self-addressing derivation (F).

§

Blake2s_256

BLAKE2s 256-bit digest, self-addressing derivation (G).

§

SHA3_256

SHA3-256 digest, self-addressing derivation (H).

§

SHA2_256

SHA2-256 digest, self-addressing derivation (I).

§

ECDSA256k1Seed

ECDSA secp256k1 256-bit random seed for a private key (J).

§

Ed448Seed

Ed448 448-bit random seed for a private key (K).

§

X448

X448 public encryption key, converted from Ed448 (L).

§

Short

Short 2-byte integer (M).

§

Big

Big 8-byte integer (N).

§

X25519Private

X25519 private decryption key/seed, may be converted from Ed25519 (O).

§

X25519CipherSeed

X25519 sealed box 124-char qb64 cipher of a 44-char qb64 seed (P).

§

ECDSA256r1Seed

ECDSA secp256r1 256-bit random seed for a private key (Q).

§

Tall

Tall 5-byte integer (R).

§

Large

Large 11-byte integer (S).

§

Great

Great 14-byte integer (T).

§

Vast

Vast 17-byte integer (U).

§

Label1

Label1: 1-byte label with lead size 1 (V).

§

Label2

Label2: 2-byte label with lead size 0 (W).

§

Tag3

Tag3: 3 Base64-encoded chars for special values (X).

§

Tag7

Tag7: 7 Base64-encoded chars for special values (Y).

§

Tag11

Tag11: 11 Base64-encoded chars for special values (Z).

§

Salt256

Salt/seed/nonce/blind, 256 bits (a).

§

Salt128

Salt/seed/nonce, 128 bits, or “Huge” number (0A).

§

Ed25519Sig

Ed25519 signature (0B).

§

ECDSA256k1Sig

ECDSA secp256k1 signature (0C).

§

Blake3_512

BLAKE3 512-bit digest, self-addressing derivation (0D).

§

Blake2b_512

BLAKE2b 512-bit digest, self-addressing derivation (0E).

§

SHA3_512

SHA3-512 digest, self-addressing derivation (0F).

§

SHA2_512

SHA2-512 digest, self-addressing derivation (0G).

§

Long

Long 4-byte integer (0H).

§

ECDSA256r1Sig

ECDSA secp256r1 signature (0I).

§

Tag1

Tag1: 1 Base64 char + 1 prepad for special values (0J).

§

Tag2

Tag2: 2 Base64-encoded chars for special values (0K).

§

Tag5

Tag5: 5 Base64-encoded chars + 1 prepad for special values (0L).

§

Tag6

Tag6: 6 Base64-encoded chars for special values (0M).

§

Tag9

Tag9: 9 Base64-encoded chars + 1 prepad for special values (0N).

§

Tag10

Tag10: 10 Base64-encoded chars for special values (0O).

§

GramHeadNeck

GramHeadNeck: 32 Base64 chars for a memogram head with neck (0P).

§

GramHead

GramHead: 28 Base64 chars for a memogram head only (0Q).

§

GramHeadAIDNeck

GramHeadAIDNeck: 76 Base64 chars for a memogram head with AID and neck (0R).

§

GramHeadAID

GramHeadAID: 72 Base64 chars for a memogram head with AID only (0S).

§

ECDSA256k1N

ECDSA secp256k1 verification key, non-transferable basic derivation (1AAA).

§

ECDSA256k1

ECDSA secp256k1 public verification or encryption key, basic derivation (1AAB).

§

Ed448N

Ed448 non-transferable public signing verification key, basic derivation (1AAC).

§

Ed448

Ed448 public signing verification key, basic derivation (1AAD).

§

Ed448Sig

Ed448 signature, self-signing derivation (1AAE).

§

Tag4

Tag4: 4 Base64-encoded chars for special values (1AAF).

§

DateTime

Base64 custom-encoded 32-char ISO-8601 DateTime (1AAG).

§

X25519CipherSalt

X25519 sealed box 100-char qb64 cipher of a 24-char qb64 salt (1AAH).

§

ECDSA256r1N

ECDSA secp256r1 verification key, non-transferable basic derivation (1AAI).

§

ECDSA256r1

ECDSA secp256r1 verification or encryption key, basic derivation (1AAJ).

§

Null

Null / None / empty value (1AAK).

§

No

Boolean false value (1AAL).

§

Yes

Boolean true value (1AAM).

§

Tag8

Tag8: 8 Base64-encoded chars for special values (1AAN).

§

Escape

Escape code for escaping special map fields (1AAO).

§

Empty

Empty value for Nonce, UUID, or related fields (1AAP).

§

TBD0S

Testing only: fixed special values with non-empty raw, lead size 0 (1__-).

§

TBD0

Testing only: fixed with lead size 0 (1___).

§

TBD1S

Testing only: fixed special values with non-empty raw, lead size 1 (2__-).

§

TBD1

Testing only: fixed with lead size 1 (2___).

§

TBD2S

Testing only: fixed special values with non-empty raw, lead size 2 (3__-).

§

TBD2

Testing only: fixed with lead size 2 (3___).

§

StrB64_L0

Variable-length Base64-only string, lead size 0 (4A).

§

StrB64_L1

Variable-length Base64-only string, lead size 1 (5A).

§

StrB64_L2

Variable-length Base64-only string, lead size 2 (6A).

§

StrB64Big_L0

Variable-length Base64-only string (big), lead size 0 (7AAA).

§

StrB64Big_L1

Variable-length Base64-only string (big), lead size 1 (8AAA).

§

StrB64Big_L2

Variable-length Base64-only string (big), lead size 2 (9AAA).

§

Bytes_L0

Variable-length byte string, lead size 0 (4B).

§

Bytes_L1

Variable-length byte string, lead size 1 (5B).

§

Bytes_L2

Variable-length byte string, lead size 2 (6B).

§

BytesBig_L0

Variable-length byte string (big), lead size 0 (7AAB).

§

BytesBig_L1

Variable-length byte string (big), lead size 1 (8AAB).

§

BytesBig_L2

Variable-length byte string (big), lead size 2 (9AAB).

§

X25519Cipher_L0

X25519 sealed-box cipher of sniffable plaintext, lead size 0 (4C).

§

X25519Cipher_L1

X25519 sealed-box cipher of sniffable plaintext, lead size 1 (5C).

§

X25519Cipher_L2

X25519 sealed-box cipher of sniffable plaintext, lead size 2 (6C).

§

X25519CipherBig_L0

X25519 sealed-box cipher of sniffable plaintext (big), lead size 0 (7AAC).

§

X25519CipherBig_L1

X25519 sealed-box cipher of sniffable plaintext (big), lead size 1 (8AAC).

§

X25519CipherBig_L2

X25519 sealed-box cipher of sniffable plaintext (big), lead size 2 (9AAC).

§

X25519CipherQB64_L0

X25519 sealed-box cipher of qb64 plaintext, lead size 0 (4D).

§

X25519CipherQB64_L1

X25519 sealed-box cipher of qb64 plaintext, lead size 1 (5D).

§

X25519CipherQB64_L2

X25519 sealed-box cipher of qb64 plaintext, lead size 2 (6D).

§

X25519CipherQB64Big_L0

X25519 sealed-box cipher of qb64 plaintext (big), lead size 0 (7AAD).

§

X25519CipherQB64Big_L1

X25519 sealed-box cipher of qb64 plaintext (big), lead size 1 (8AAD).

§

X25519CipherQB64Big_L2

X25519 sealed-box cipher of qb64 plaintext (big), lead size 2 (9AAD).

§

X25519CipherQB2_L0

X25519 sealed-box cipher of qb2 plaintext, lead size 0 (4E).

§

X25519CipherQB2_L1

X25519 sealed-box cipher of qb2 plaintext, lead size 1 (5E).

§

X25519CipherQB2_L2

X25519 sealed-box cipher of qb2 plaintext, lead size 2 (6E).

§

X25519CipherQB2Big_L0

X25519 sealed-box cipher of qb2 plaintext (big), lead size 0 (7AAE).

§

X25519CipherQB2Big_L1

X25519 sealed-box cipher of qb2 plaintext (big), lead size 1 (8AAE).

§

X25519CipherQB2Big_L2

X25519 sealed-box cipher of qb2 plaintext (big), lead size 2 (9AAE).

§

HPKEBaseCipher_L0

HPKE Base cipher of sniffable plaintext, lead size 0 (4F).

§

HPKEBaseCipher_L1

HPKE Base cipher of sniffable plaintext, lead size 1 (5F).

§

HPKEBaseCipher_L2

HPKE Base cipher of sniffable plaintext, lead size 2 (6F).

§

HPKEBaseCipherBig_L0

HPKE Base cipher of sniffable plaintext (big), lead size 0 (7AAF).

§

HPKEBaseCipherBig_L1

HPKE Base cipher of sniffable plaintext (big), lead size 1 (8AAF).

§

HPKEBaseCipherBig_L2

HPKE Base cipher of sniffable plaintext (big), lead size 2 (9AAF).

§

Decimal_L0

Decimal Base64 float/int string, lead size 0 (4H).

§

Decimal_L1

Decimal Base64 float/int string, lead size 1 (5H).

§

Decimal_L2

Decimal Base64 float/int string, lead size 2 (6H).

§

DecimalBig_L0

Decimal Base64 float/int string (big), lead size 0 (7AAH).

§

DecimalBig_L1

Decimal Base64 float/int string (big), lead size 1 (8AAH).

§

DecimalBig_L2

Decimal Base64 float/int string (big), lead size 2 (9AAH).

Implementations§

Source§

impl MatterCode

Source

pub fn frame_size(stream: &[u8]) -> Result<usize, MatterBuildError>

Full qb64 character size of the Matter primitive at the head of stream, without decoding the raw body or validating pad/lead bits.

§Errors

MatterBuildError on unknown code, short soft field, non-UTF-8 soft, or size overflow.

Source§

impl MatterCode

Source

pub fn from_base64_stream(stream: &[u8]) -> Result<Self, ParsingError>

Parses a MatterCode from a Base64-encoded byte stream.

§Errors

Returns ParsingError if the stream is empty, too short, contains invalid UTF-8, or does not match a known matter code.

Source

pub fn from_stream(stream: &[u8]) -> Result<Self, ParsingError>

Parses a MatterCode from a binary (qb2) byte stream.

§Errors

Returns ParsingError if the stream is empty, too short, or does not match a known matter code.

Source

pub const fn is_base64_text_code(&self) -> bool

BextCodex is codex of all variable sized Base64 Text (Bext) derivation codes. Only provide defined codes. Undefined are left out so that inclusion(exclusion) via ‘in’ operator works.

Source

pub const fn is_text_code(&self) -> bool

TextCodex is codex of all variable sized byte string (Text) derivation codes. Only provide defined codes. Undefined are left out so that inclusion(exclusion) via ‘in’ operator works.

Source

pub const fn is_base_64_decimal(&self) -> bool

DecimalCodex is codex of all variable sized Base64 String representation of decimal numbers both signed and unsigned, float and int. Only provide defined codes. Undefined are left out so that inclusion(exclusion) via ‘in’ operator works.

Source

pub const fn is_digest(&self) -> bool

DigCodex is codex all digest derivation codes. This is needed to ensure delegated inception using a self-addressing derivation i.e. digest derivation code. Only provide defined codes. Undefined are left out so that inclusion(exclusion) via ‘in’ operator works.

Source

pub const fn is_nonce(&self) -> bool

NonceCodex is codex all derivation codes for salty nonces (UUIDs) either as random numbers or as digests deterministically derived from salty nonces. Only provide defined codes. Undefined are left out so that inclusion(exclusion) via “in” operator works.

Source

pub const fn is_base64_num(&self) -> bool

NumCodex is codex of Base64 derivation codes for compactly representing numbers across a wide rage of sizes. Only provide defined codes. Undefined are left out so that inclusion(exclusion) via “in” operator works.

Source

pub const fn is_base64_tag(&self) -> bool

TagCodex is codex of Base64 derivation codes for compactly representing various small Base64 tag values as special code soft part values. Only provide defined codes. Undefined are left out so that inclusion(exclusion) via “in” operator works.

Source

pub const fn is_label(&self) -> bool

LabelCodex is codex of codes to compactly ser/des labels and string values in maps or lists. Only provide defined codes. Undefined are left out so that inclusion(exclusion) via “in” operator works.

Source

pub const fn is_prefix_derivation(&self) -> bool

PreCodex is codex all identifier prefix derivation codes. This is needed to verify valid inception events. Only provide defined codes. Undefined are left out so that inclusion(exclusion) via “in” operator works.

Source

pub const fn is_non_transferable(&self) -> bool

NonTransCodex is codex all non-transferable derivation codes Only provide defined codes. Undefined are left out so that inclusion(exclusion) via “in” operator works.

Source

pub const fn is_prefix_non_digestive(&self) -> bool

PreNonDigCodex is codex all prefixive but non-digestive derivation codes Only provide defined codes. Undefined are left out so that inclusion(exclusion) via “in” operator works.

Source

pub const fn get_sizage(&self) -> Sizage

Returns the Sizage descriptor for this code.

Source

pub fn promote(&self, size: usize, lead: usize) -> Result<Self, ValidationError>

Promotes this variable-size code to the appropriate variant for the given size and lead.

§Errors

Returns ValidationError if the code cannot be promoted (e.g. fixed-size code, size exceeds capacity, or invalid lead).

Source

pub fn raw_size(&self) -> Result<usize, ValidationError>

Returns raw size in bytes not including leader for a given code.

§Errors

Returns ValidationError::InvalidSizingOperation if the code is variable-size.

Source

pub const fn is_special(&self) -> bool

Returns true if this code is a special fixed-size code with soft data.

Trait Implementations§

Source§

impl AsRef<str> for MatterCode

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl CesrCode for MatterCode

Source§

fn to_matter_code(&self) -> MatterCode

Converts this typed code to the untyped MatterCode.
Source§

fn as_str(&self) -> &'static str

Returns the canonical Base64 string representation of this code.
Source§

fn get_sizage(&self) -> Sizage

Returns the Sizage descriptor for this code.
Source§

fn raw_size(&self) -> Result<usize, ValidationError>

Returns the expected raw byte size for this code. Read more
Source§

fn placeholder(&self) -> Result<String, ValidationError>

Available on crate feature alloc only.
Returns a placeholder qb64 string of this code’s full character width, filled with DUMMY_CHAR. Read more
Source§

impl Clone for MatterCode

Source§

fn clone(&self) -> MatterCode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for MatterCode

Source§

impl Debug for MatterCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for MatterCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for MatterCode

Source§

impl<'_derivative_strum> From<&'_derivative_strum MatterCode> for &'static str

Source§

fn from(x: &'_derivative_strum MatterCode) -> &'static str

Converts to this type from the input type.
Source§

impl From<DigestCode> for MatterCode

Source§

fn from(code: DigestCode) -> Self

Converts to this type from the input type.
Source§

impl From<LabelerCode> for MatterCode

Source§

fn from(code: LabelerCode) -> Self

Converts to this type from the input type.
Source§

impl From<MatterCode> for &'static str

Source§

fn from(x: MatterCode) -> &'static str

Converts to this type from the input type.
Source§

impl From<NoncerCode> for MatterCode

Source§

fn from(code: NoncerCode) -> Self

Converts to this type from the input type.
Source§

impl From<NumberCode> for MatterCode

Source§

fn from(code: NumberCode) -> Self

Converts to this type from the input type.
Source§

impl From<SeedCode> for MatterCode

Source§

fn from(code: SeedCode) -> Self

Converts to this type from the input type.
Source§

impl From<SignatureCode> for MatterCode

Source§

fn from(code: SignatureCode) -> Self

Converts to this type from the input type.
Source§

impl From<TexterCode> for MatterCode

Source§

fn from(code: TexterCode) -> Self

Converts to this type from the input type.
Source§

impl From<VerKeyCode> for MatterCode

Source§

fn from(code: VerKeyCode) -> Self

Converts to this type from the input type.
Source§

impl From<VerserCode> for MatterCode

Source§

fn from(code: VerserCode) -> Self

Converts to this type from the input type.
Source§

impl FromStr for MatterCode

Source§

type Err = ParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<MatterCode, <Self as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for MatterCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IntoEnumIterator for MatterCode

Source§

impl PartialEq for MatterCode

Source§

fn eq(&self, other: &MatterCode) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MatterCode

Source§

impl TryFrom<&str> for MatterCode

Source§

type Error = ParseError

The type returned in the event of a conversion error.
Source§

fn try_from(s: &str) -> Result<MatterCode, <Self as TryFrom<&str>>::Error>

Performs the conversion.
Source§

impl TryFrom<MatterCode> for DigestCode

Source§

type Error = ValidationError

The type returned in the event of a conversion error.
Source§

fn try_from(code: MatterCode) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<MatterCode> for LabelerCode

Source§

type Error = ValidationError

The type returned in the event of a conversion error.
Source§

fn try_from(code: MatterCode) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<MatterCode> for NoncerCode

Source§

type Error = ValidationError

The type returned in the event of a conversion error.
Source§

fn try_from(code: MatterCode) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<MatterCode> for NumberCode

Source§

type Error = ValidationError

The type returned in the event of a conversion error.
Source§

fn try_from(code: MatterCode) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<MatterCode> for SeedCode

Source§

type Error = ValidationError

The type returned in the event of a conversion error.
Source§

fn try_from(code: MatterCode) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<MatterCode> for SignatureCode

Source§

type Error = ValidationError

The type returned in the event of a conversion error.
Source§

fn try_from(code: MatterCode) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<MatterCode> for TexterCode

Source§

type Error = ValidationError

The type returned in the event of a conversion error.
Source§

fn try_from(code: MatterCode) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<MatterCode> for VerKeyCode

Source§

type Error = ValidationError

The type returned in the event of a conversion error.
Source§

fn try_from(code: MatterCode) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<MatterCode> for VerserCode

Source§

type Error = ValidationError

The type returned in the event of a conversion error.
Source§

fn try_from(code: MatterCode) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl VariantNames for MatterCode

Source§

const VARIANTS: &'static [&'static str]

Names of the variants of this enum

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.