pub struct SendAccessView {
pub id: Option<String>,
pub type_: Option<SendType>,
pub name: Option<String>,
pub text: Option<SendAccessTextView>,
pub file: Option<SendAccessFileView>,
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 the wire response already carries (expirationDate, creatorIdentifier).
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)
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 From<SendAccessView> for JsValuewhere
SendAccessView: Serialize,
impl From<SendAccessView> for JsValuewhere
SendAccessView: Serialize,
Source§fn from(value: SendAccessView) -> Self
fn from(value: SendAccessView) -> Self
Source§impl IntoWasmAbi for &SendAccessViewwhere
SendAccessView: Serialize,
impl IntoWasmAbi for &SendAccessViewwhere
SendAccessView: Serialize,
Source§impl IntoWasmAbi for SendAccessViewwhere
SendAccessView: Serialize,
impl IntoWasmAbi for SendAccessViewwhere
SendAccessView: Serialize,
Source§impl OptionIntoWasmAbi for SendAccessViewwhere
SendAccessView: Serialize,
impl OptionIntoWasmAbi for SendAccessViewwhere
SendAccessView: Serialize,
Source§impl PartialEq for SendAccessView
impl PartialEq for SendAccessView
Source§impl Serialize for SendAccessView
impl Serialize for SendAccessView
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\n * additions the wire response already carries (`expirationDate`, `creatorIdentifier`).\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 * 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
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
Source§impl VectorIntoWasmAbi for SendAccessViewwhere
SendAccessView: Serialize,
impl VectorIntoWasmAbi for SendAccessViewwhere
SendAccessView: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl WasmDescribe for SendAccessView
impl WasmDescribe for SendAccessView
impl StructuralPartialEq for SendAccessView
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<T> CompatExt for T
impl<T> CompatExt for T
§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>
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.