pub(crate) struct AuthOptions<'a> {
pub(crate) file: Option<&'a str>,
pub(crate) user: Option<&'a str>,
pub(crate) explicit: bool,
}Fields§
§file: Option<&'a str>§user: Option<&'a str>§explicit: boolWhether either flag was actually given.
Separate from the two options because AuthOptions::file_for
fills file in from the layout choir init wrote, and the
commands that refuse to take a credential at all — init,
join, key, git-credential — must keep asking “did the
reader pass one”, not “is there one”.
Implementations§
Source§impl<'a> AuthOptions<'a>
impl<'a> AuthOptions<'a>
pub(crate) fn is_empty(self) -> bool
Sourcepub(crate) fn file_for(self, api: &str) -> Option<&'a str>
pub(crate) fn file_for(self, api: &str) -> Option<&'a str>
The credential to use when talking to api.
What was given, else the one choir init wrote — so the command
that creates a node and the commands that read it agree without
a path being typed in between. Before this, every one of them
answered 401 on a node the same tool had just set up.
Trait Implementations§
Source§impl<'a> Clone for AuthOptions<'a>
impl<'a> Clone for AuthOptions<'a>
Source§fn clone(&self) -> AuthOptions<'a>
fn clone(&self) -> AuthOptions<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for AuthOptions<'a>
Auto Trait Implementations§
impl<'a> Freeze for AuthOptions<'a>
impl<'a> RefUnwindSafe for AuthOptions<'a>
impl<'a> Send for AuthOptions<'a>
impl<'a> Sync for AuthOptions<'a>
impl<'a> Unpin for AuthOptions<'a>
impl<'a> UnsafeUnpin for AuthOptions<'a>
impl<'a> UnwindSafe for AuthOptions<'a>
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