pub struct NestedTokenSpec {
pub prefix: char,
pub domain: NestedDomain,
pub token: NestedTokenValue,
pub token_data: Option<Vec<u8>>,
pub raw: String,
}Expand description
A nested token specification (e.g. $#%08x, ${domain}#%08x, ${$#%08x}#%08x).
Fields§
§prefix: charPrefix character, typically '$'.
domain: NestedDomainDomain specification.
token: NestedTokenValueThe token value specification.
token_data: Option<Vec<u8>>Additional token argument data decoded from base64 (None if not base64).
raw: StringThe raw format string slice representing this nested token.
Preserved verbatim because parsing SEED-0105 nested tokens into
(prefix, domain, token) is intentionally lossy across:
- stripped whitespace inside
{ ... }domain braces (e.g.${ my domain }#...and${}#%08xvs$#%08x), - explicit radix specifiers (
$10#...,$16#...,$64#...), - hex letter casing (
$#DEADBEEFvs$#deadbeef), and - Base64 nested tokens with embedded binary argument payloads (
$AQIDBA==).
Retaining the verbatim source slice ensures fallback formatting when a nested token cannot be decoded reproduces the exact original text.
Implementations§
Source§impl NestedTokenSpec
impl NestedTokenSpec
Sourcepub fn token_data(&self) -> Option<&[u8]>
pub fn token_data(&self) -> Option<&[u8]>
Returns the additional token argument data as an optional byte slice.
Trait Implementations§
Source§impl Clone for NestedTokenSpec
impl Clone for NestedTokenSpec
Source§fn clone(&self) -> NestedTokenSpec
fn clone(&self) -> NestedTokenSpec
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 NestedTokenSpec
impl Debug for NestedTokenSpec
Source§impl Default for NestedTokenSpec
impl Default for NestedTokenSpec
impl Eq for NestedTokenSpec
Source§impl PartialEq for NestedTokenSpec
impl PartialEq for NestedTokenSpec
impl StructuralPartialEq for NestedTokenSpec
Auto Trait Implementations§
impl Freeze for NestedTokenSpec
impl RefUnwindSafe for NestedTokenSpec
impl Send for NestedTokenSpec
impl Sync for NestedTokenSpec
impl Unpin for NestedTokenSpec
impl UnsafeUnpin for NestedTokenSpec
impl UnwindSafe for NestedTokenSpec
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