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§
Auto Trait Implementations§
impl !RefUnwindSafe for ProviderAuth
impl !UnwindSafe for ProviderAuth
impl Freeze for ProviderAuth
impl Send for ProviderAuth
impl Sync for ProviderAuth
impl Unpin for ProviderAuth
impl UnsafeUnpin 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
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> ErasedDestructor for Twhere
T: 'static,
§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> ⓘ
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.