pub enum InviteStorage {
Account(StorageInvitation),
S3 {
invitation: StorageInvitation,
credentials: S3Credentials,
},
}Expand description
The storage part of format.md D13’s invitation. Account credentials are never shared; S3 credentials are the key created specifically for this invite.
Variants§
Account(StorageInvitation)
The recipient signs in to their own provider account.
S3
The recipient uses the key made for them in the provider console.
Fields
§
invitation: StorageInvitationThe store location to open.
§
credentials: S3CredentialsThe invited member’s own key.
Implementations§
Source§impl InviteStorage
impl InviteStorage
Sourcepub fn encode(&self) -> Result<SecretBytes, StorageError>
pub fn encode(&self) -> Result<SecretBytes, StorageError>
Pack the invitation and, on S3, the member’s key (format.md D13), in zeroizing storage. An S3 invitation without a key, or a key for another provider, is refused.
Sourcepub fn decode(bytes: &[u8]) -> Result<Self, StorageError>
pub fn decode(bytes: &[u8]) -> Result<Self, StorageError>
Decode a packed payload after checking the enclosing invitation: the location’s provider says whether a key follows.
Trait Implementations§
Source§impl Clone for InviteStorage
impl Clone for InviteStorage
Source§fn clone(&self) -> InviteStorage
fn clone(&self) -> InviteStorage
Returns a duplicate of the value. Read more
1.0.0 · 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 InviteStorage
impl RefUnwindSafe for InviteStorage
impl Send for InviteStorage
impl Sync for InviteStorage
impl Unpin for InviteStorage
impl UnsafeUnpin for InviteStorage
impl UnwindSafe for InviteStorage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.