pub enum Action {
Get(Context),
Store(BString),
Erase(BString),
}
Expand description
The action to perform by the credentials helper.
Variants§
Get(Context)
Provide credentials using the given repository context, which must include the repository url.
Store(BString)
Approve the credentials as identified by the previous input provided as BString
, containing information from Context
.
Erase(BString)
Reject the credentials as identified by the previous input provided as BString
. containing information from Context
.
Implementations§
Source§impl Action
impl Action
Initialization
Sourcepub fn get_for_url(url: impl Into<BString>) -> Action
pub fn get_for_url(url: impl Into<BString>) -> Action
Create a Get
action with context containing the given URL.
Note that this creates an Action
suitable for the credential helper cascade only.
Source§impl Action
impl Action
Access
Sourcepub fn context(&self) -> Option<&Context>
pub fn context(&self) -> Option<&Context>
Return the context of a get operation, or None
.
The opposite of payload
.
Sourcepub fn context_mut(&mut self) -> Option<&mut Context>
pub fn context_mut(&mut self) -> Option<&mut Context>
Return the mutable context of a get operation, or None
.
Sourcepub fn expects_output(&self) -> bool
pub fn expects_output(&self) -> bool
Returns true if this action expects output from the helper.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnwindSafe for Action
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