pub enum ProviderAuth {
S3(S3Credentials),
OAuth {
tokens: OAuthTokens,
custody: Arc<dyn TokenCustody>,
},
CloudKit,
}Expand description
What a connection authenticates with (§20.2).
Variants§
S3(S3Credentials)
This member’s S3 key.
OAuth
A provider sign-in, refreshed in its custody when the provider rejects it.
Fields
§
tokens: OAuthTokensThe tokens the connection starts with.
§
custody: Arc<dyn TokenCustody>Where a rejected token’s replacement is committed.
CloudKit
The device’s Apple account.
Implementations§
Source§impl ProviderAuth
impl ProviderAuth
Sourcepub fn new(
credentials: StorageCredentials,
custody: Arc<dyn TokenCustody>,
) -> Self
pub fn new( credentials: StorageCredentials, custody: Arc<dyn TokenCustody>, ) -> Self
Committed credentials, with the custody that refreshes an OAuth sign-in.
Sourcepub fn credentials(&self) -> StorageCredentials
pub fn credentials(&self) -> StorageCredentials
The credentials this connection starts with.
Trait Implementations§
Source§impl Clone for ProviderAuth
impl Clone for ProviderAuth
Source§fn clone(&self) -> ProviderAuth
fn clone(&self) -> ProviderAuth
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 ProviderAuth
impl !RefUnwindSafe for ProviderAuth
impl Send for ProviderAuth
impl Sync for ProviderAuth
impl Unpin for ProviderAuth
impl UnsafeUnpin for ProviderAuth
impl !UnwindSafe for ProviderAuth
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.