pub struct Credential { /* private fields */ }Expand description
The credential a home issued to a seed’s principal: one user:token
line, the shape of a line in the home’s --auth-file.
It never reaches an argv, where ps would show it, and never a URL:
curl reads it from stdin, and git from its environment.
Implementations§
Source§impl Credential
impl Credential
Sourcepub fn read(path: &Path) -> Result<Self, String>
pub fn read(path: &Path) -> Result<Self, String>
Reads path: its first non-blank, non-comment line, as user:token.
§Errors
The file cannot be read, holds no such line, or carries a quote, backslash or control character, any of which could turn a quoted curl config line into a second directive.
Trait Implementations§
Source§impl Clone for Credential
impl Clone for Credential
Source§fn clone(&self) -> Credential
fn clone(&self) -> Credential
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 moreAuto Trait Implementations§
impl Freeze for Credential
impl RefUnwindSafe for Credential
impl Send for Credential
impl Sync for Credential
impl Unpin for Credential
impl UnsafeUnpin for Credential
impl UnwindSafe for Credential
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