Enum git_credentials::helper::Action
source · 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.