pub struct SignedPayload {
pub sulid: Sulid,
pub public_key: VerifyingKey,
pub signature: Signature,
pub message_hash: Hash,
pub message_length: u64,
pub app_metadata: Vec<u8>,
}Expand description
Output of Sulid::sign, also used to verify sULIDs.
This contains the generated sULID and the necessary context to validate it.
The sULID generated by Sulid::sign will always be valid, so no need to revalidate it.
However, if you want to validate an untrusted sULID, construct this SignedPayload and check
SignedPayload::is_valid()
Fields§
§sulid: Sulid§public_key: VerifyingKey§signature: Signature§message_hash: Hash§message_length: u64§app_metadata: Vec<u8>Implementations§
Trait Implementations§
Source§impl Clone for SignedPayload
impl Clone for SignedPayload
Source§fn clone(&self) -> SignedPayload
fn clone(&self) -> SignedPayload
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 moreAuto Trait Implementations§
impl Freeze for SignedPayload
impl RefUnwindSafe for SignedPayload
impl Send for SignedPayload
impl Sync for SignedPayload
impl Unpin for SignedPayload
impl UnsafeUnpin for SignedPayload
impl UnwindSafe for SignedPayload
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