impl FromStr for Alphabet { type Err = String; fn from_str(s: &str) -> Result<Self, String> { match s { "standard" => Ok(Self::Standard), "urlsafe" => Ok(Self::UrlSafe),
_ => Err(format!("alphabet '{}' unrecognized", s)),
}
}
}
/// Base64 encode or decode FILE (or standard input), to standard output. #[derive(Debug, StructOpt)] struct Opt { /// decode data #[structopt(short = "d", long = "decode")]
decode: bool, /// The alphabet to choose. Defaults to the standard base64 alphabet. /// Supported alphabets include "standard" and "urlsafe". #[structopt(long = "alphabet")]
alphabet: Option<Alphabet>, /// The file to encode/decode. #[structopt(parse(from_os_str))]
file: Option<PathBuf>,
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.