pub struct Footer {
pub kid: Option<String>,
pub version: Option<String>,
pub issuer_meta: Option<String>,
pub custom: HashMap<String, Value>,
}Expand description
Footer data for additional authenticated metadata
Fields§
§kid: Option<String>Key identifier for key rotation and selection
version: Option<String>Token version for compatibility tracking
issuer_meta: Option<String>Issuer-specific metadata
custom: HashMap<String, Value>Additional custom metadata
Implementations§
Sourcepub fn set_version(&mut self, version: &str) -> Result<(), PqPasetoError>
pub fn set_version(&mut self, version: &str) -> Result<(), PqPasetoError>
Set the version
Sourcepub fn set_issuer_meta(
&mut self,
issuer_meta: &str,
) -> Result<(), PqPasetoError>
pub fn set_issuer_meta( &mut self, issuer_meta: &str, ) -> Result<(), PqPasetoError>
Set issuer metadata
Sourcepub fn add_custom<T: Serialize + ?Sized>(
&mut self,
key: &str,
value: &T,
) -> Result<(), PqPasetoError>
pub fn add_custom<T: Serialize + ?Sized>( &mut self, key: &str, value: &T, ) -> Result<(), PqPasetoError>
Add custom footer field
Sourcepub fn get_custom(&self, key: &str) -> Option<&Value>
pub fn get_custom(&self, key: &str) -> Option<&Value>
Get custom footer field
Sourcepub fn issuer_meta(&self) -> Option<&str>
pub fn issuer_meta(&self) -> Option<&str>
Get issuer metadata
Sourcepub fn to_base64(&self) -> Result<String, PqPasetoError>
pub fn to_base64(&self) -> Result<String, PqPasetoError>
Serialize footer to base64url-encoded JSON
Trait Implementations§
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
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