pub struct Credentials {
pub apple_id: AppleId,
/* private fields */
}Expand description
An Apple ID and its app-specific password.
The password is a SecretString: it is not Serialize, and Debug prints
a redaction instead of the characters.
Fields§
§apple_id: AppleIdThe primary iCloud address.
Implementations§
Source§impl Credentials
impl Credentials
Sourcepub fn new(apple_id: AppleId, secret: impl Into<SecretString>) -> Self
pub fn new(apple_id: AppleId, secret: impl Into<SecretString>) -> Self
Builds credentials. The password is read back only through Self::with_secret.
Sourcepub fn with_secret<T>(&self, read: impl FnOnce(&str) -> T) -> T
pub fn with_secret<T>(&self, read: impl FnOnce(&str) -> T) -> T
Passes the password to read and ends the borrow before returning.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Credentials
impl Freeze for Credentials
impl Move for Credentials
impl RefUnwindSafe for Credentials
impl Send for Credentials
impl Sync for Credentials
impl Unpin for Credentials
impl UnsafeUnpin for Credentialswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const str is !null: UnsafeUnpin,
PhantomData<str>: UnsafeUnpin,
impl UnwindSafe for Credentials
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