pub struct HandlePayload {
pub v: u8,
pub iss: String,
pub p: String,
pub exp: u64,
pub n: String,
}Expand description
A handle’s payload, carried in the clear in the token’s middle segment.
Readable by anyone holding the token, and deliberately so: the payload is not the secret. The MAC is what makes it unforgeable, and the audience — which is not carried here — is what makes it non-bearer.
There is no generation field. A handle authorises a file, not a version of one; see the module documentation.
Fields§
§v: u8Payload version. Only [PAYLOAD_VERSION] is minted or accepted.
iss: StringThe minting session’s session_id — the capsule instance, not the capsule.
p: StringPath relative to exports.peer_files.root, canonicalised at mint time. Never absolute,
and never the accessible-workdir-relative form: the peer plane discloses no path structure
above the root.
exp: u64Absolute expiry, in unix milliseconds.
n: StringRandom bytes, lowercase hex, so two handles for the same file and audience are distinct.
Trait Implementations§
Source§impl Clone for HandlePayload
impl Clone for HandlePayload
Source§impl Debug for HandlePayload
impl Debug for HandlePayload
Source§impl<'de> Deserialize<'de> for HandlePayload
impl<'de> Deserialize<'de> for HandlePayload
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>,
impl Eq for HandlePayload
Source§impl PartialEq for HandlePayload
impl PartialEq for HandlePayload
Source§impl Serialize for HandlePayload
impl Serialize for HandlePayload
impl StructuralPartialEq for HandlePayload
Auto Trait Implementations§
impl Forget for HandlePayload
impl Freeze for HandlePayload
impl Move for HandlePayload
impl RefUnwindSafe for HandlePayload
impl Send for HandlePayload
impl Sync for HandlePayload
impl Unpin for HandlePayload
impl UnsafeUnpin for HandlePayload
impl UnwindSafe for HandlePayload
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more