pub struct TokenSizeBreakdown {
pub prefix: usize,
pub payload: usize,
pub signature_or_tag: usize,
pub footer: Option<usize>,
pub separators: usize,
pub base64_overhead: usize,
}Expand description
Token size breakdown showing individual components
This struct provides detailed information about how token size is distributed across different components, useful for optimization and debugging.
Fields§
§prefix: usizeSize of the protocol prefix (“paseto.pq1.public.” or “paseto.pq1.local.”)
payload: usizeSize of the JSON payload after base64 encoding
signature_or_tag: usizeSize of signature (public tokens) or authentication tag (local tokens)
Size of footer if present
separators: usizeSize of separator dots between parts
base64_overhead: usizeAdditional overhead from base64 encoding (~33% expansion)
Implementations§
Trait Implementations§
Source§impl Clone for TokenSizeBreakdown
impl Clone for TokenSizeBreakdown
Source§fn clone(&self) -> TokenSizeBreakdown
fn clone(&self) -> TokenSizeBreakdown
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TokenSizeBreakdown
impl RefUnwindSafe for TokenSizeBreakdown
impl Send for TokenSizeBreakdown
impl Sync for TokenSizeBreakdown
impl Unpin for TokenSizeBreakdown
impl UnwindSafe for TokenSizeBreakdown
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