pub struct SendAccessView {
pub id: Option<String>,
pub type_: Option<SendType>,
pub name: Option<String>,
pub text: Option<SendAccessTextView>,
pub file: Option<SendAccessFileView>,
pub data: Option<SendAccessItemView>,
pub expiration_date: Option<DateTime<Utc>>,
pub creator_identifier: Option<String>,
}Expand description
Plaintext view of a SendAccessResponse, produced by
SendAccessKey::decrypt_response.
Mirrors the legacy CLI’s SendAccessResponse output shape (apps/cli) so that a
JSON dump of a received send stays recognizable to existing scripts, with two additions:
expirationDate and creatorIdentifier are already present on the raw
SendAccessResponse the server returns, but the legacy CLI’s output shape drops them.
text/file are kept as independent Options rather than collapsed into an enum with
associated data: type_ is Option<SendType> on the wire and an unrecognized or absent
discriminant must still round-trip (both the legacy CLI and bw receive fall back to
dumping whatever the server returned), which a total enum could not represent.
Fields§
§id: Option<String>The send access ID
type_: Option<SendType>The send type.
name: Option<String>The decrypted send name. None when the send has no name, which is not an error —
a nameless text send still has printable content.
text: Option<SendAccessTextView>Decrypted text content (if type is Text)
file: Option<SendAccessFileView>Decrypted file metadata (if type is File)
data: Option<SendAccessItemView>Decrypted item content (if type is Item)
expiration_date: Option<DateTime<Utc>>When the send expires.
creator_identifier: Option<String>The creator’s identifier (email), if not hidden
Trait Implementations§
Source§impl Debug for SendAccessView
impl Debug for SendAccessView
Source§impl<'de> Deserialize<'de> for SendAccessView
impl<'de> Deserialize<'de> for SendAccessView
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>,
Source§impl FromWasm for SendAccessView
Available on crate feature wasm only.
impl FromWasm for SendAccessView
wasm only.Source§impl PartialEq for SendAccessView
impl PartialEq for SendAccessView
Source§impl Serialize for SendAccessView
impl Serialize for SendAccessView
impl StructuralPartialEq for SendAccessView
Source§impl ToWasm for SendAccessView
Available on crate feature wasm only.
impl ToWasm for SendAccessView
wasm only.Source§impl Tsify for SendAccessView
impl Tsify for SendAccessView
const DECL: &'static str = "/**\n * Plaintext view of a [`SendAccessResponse`], produced by\n * [`SendAccessKey::decrypt_response`].\n *\n * Mirrors the legacy CLI\'s `SendAccessResponse` output shape (`apps/cli`) so that a\n * JSON dump of a received send stays recognizable to existing scripts, with two additions:\n * `expirationDate` and `creatorIdentifier` are already present on the raw\n * `SendAccessResponse` the server returns, but the legacy CLI\'s output shape drops them.\n *\n * `text`/`file` are kept as independent `Option`s rather than collapsed into an enum with\n * associated data: `type_` is `Option<SendType>` on the wire and an unrecognized or absent\n * discriminant must still round-trip (both the legacy CLI and `bw receive` fall back to\n * dumping whatever the server returned), which a total enum could not represent.\n */\nexport interface SendAccessView {\n /**\n * The send access ID\n */\n id: string | undefined;\n /**\n * The send type.\n */\n type: SendType | undefined;\n /**\n * The decrypted send name. `None` when the send has no name, which is not an error \u{2014}\n * a nameless text send still has printable content.\n */\n name: string | undefined;\n /**\n * Decrypted text content (if type is Text)\n */\n text: SendAccessTextView | undefined;\n /**\n * Decrypted file metadata (if type is File)\n */\n file: SendAccessFileView | undefined;\n /**\n * Decrypted item content (if type is Item)\n */\n data: SendAccessItemView | undefined;\n /**\n * When the send expires.\n */\n expirationDate: DateTime<Utc> | undefined;\n /**\n * The creator\'s identifier (email), if not hidden\n */\n creatorIdentifier: string | undefined;\n}"
const SERIALIZATION_CONFIG: SerializationConfig
Source§type JsType = JsType
type JsType = JsType
#[wasm_bindgen] extern "C" { .. }.
[Ts<T>] is #[repr(transparent)] over this and passes it across the
ABI as a plain JS handle, which any other representation would break.fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
Auto Trait Implementations§
impl Freeze for SendAccessView
impl RefUnwindSafe for SendAccessView
impl Send for SendAccessView
impl Sync for SendAccessView
impl Unpin for SendAccessView
impl UnsafeUnpin for SendAccessView
impl UnwindSafe for SendAccessView
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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