Struct git_credentials::Program
source · Expand description
A program/executable implementing the credential helper protocol.
Fields§
§kind: Kind
The kind of program, ready for launch.
stderr: bool
If true, stderr is enabled, which is the default.
Implementations§
source§impl Program
impl Program
Initialization
sourcepub fn from_custom_definition(input: impl Into<BString>) -> Self
pub fn from_custom_definition(input: impl Into<BString>) -> Self
Parse the given input as per the custom helper definition, supporting !<script>
, name
and /absolute/name
, the latter two
also support arguments which are ignored here.
Examples found in repository?
src/helper/cascade.rs (line 34)
24 25 26 27 28 29 30 31 32 33 34 35 36
pub fn platform_builtin() -> Vec<Program> {
if cfg!(target_os = "macos") {
Some("osxkeychain")
} else if cfg!(target_os = "linux") {
Some("libsecret")
} else if cfg!(target_os = "windows") {
Some("manager-core")
} else {
None
}
.map(|name| vec![Program::from_custom_definition(name)])
.unwrap_or_default()
}
source§impl Program
impl Program
Builder
sourcepub fn suppress_stderr(self) -> Self
pub fn suppress_stderr(self) -> Self
By default stderr
of programs is inherited and typically displayed in the terminal.