pub struct ShareMetadata {
pub version: String,
pub expires_at: Option<String>,
pub link_scope: Option<WrappedScope>,
pub assets: Vec<SharedAsset>,
}Expand description
The record a share viewer starts from, sealed into the blob at the link’s metadata_hash
(GET /s/{opaque-id} names the hash; /s/{opaque-id}/blob/{hash} serves the bytes).
Sealed under HKDF(link_secret, salt=opaque_id, info=share-metadata/v1), so the server, which
never sees the fragment, cannot read it. Built by publish_share and read by
open_share_metadata.
Fields§
§version: StringAlways SHARE_METADATA_VERSION.
expires_at: Option<String>RFC 3339 expiry the issuer set, shown to the viewer. The server enforces expiry on its own record and never discloses it; this copy is for display only.
link_scope: Option<WrappedScope>The link-only WrappedScope, present iff the link has no passphrase.
A link with no passphrase has no wrapped secret on the server, so its scope travels here.
A passphrase link’s scope never does: placing it here would let the fragment alone open
what the passphrase is meant to guard, so it is served only from
/s/{opaque-id}/wrapped-secret.
assets: Vec<SharedAsset>Every asset the link covers.
Trait Implementations§
Source§fn clone(&self) -> ShareMetadata
fn clone(&self) -> ShareMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§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>,
Source§fn eq(&self, other: &ShareMetadata) -> bool
fn eq(&self, other: &ShareMetadata) -> bool
self and other values to be equal, and is used by ==.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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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