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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)