Home
last modified time | relevance | path

Searched refs:OsString (Results 1 – 25 of 63) sorted by relevance

123

/third_party/rust/crates/clap/tests/derive/
Dutf8.rs5 use std::ffi::OsString;
21 let m = Positional::try_parse_from(vec![OsString::from(""), OsString::from_vec(vec![0xe9])]); in invalid_utf8_strict_positional()
29 OsString::from(""), in invalid_utf8_strict_option_short_space()
30 OsString::from("-a"), in invalid_utf8_strict_option_short_space()
31 OsString::from_vec(vec![0xe9]), in invalid_utf8_strict_option_short_space()
40 OsString::from(""), in invalid_utf8_strict_option_short_equals()
41 OsString::from_vec(vec![0x2d, 0x61, 0x3d, 0xe9]), in invalid_utf8_strict_option_short_equals()
50 OsString::from(""), in invalid_utf8_strict_option_short_no_space()
51 OsString::from_vec(vec![0x2d, 0x61, 0xe9]), in invalid_utf8_strict_option_short_no_space()
60 OsString::from(""), in invalid_utf8_strict_option_long_space()
[all …]
/third_party/rust/crates/clap/tests/builder/
Dutf8.rs4 use std::ffi::OsString;
11 .try_get_matches_from(vec![OsString::from(""), OsString::from_vec(vec![0xe9])]); in invalid_utf8_strict_positional()
26 OsString::from(""), in invalid_utf8_strict_option_short_space()
27 OsString::from("-a"), in invalid_utf8_strict_option_short_space()
28 OsString::from_vec(vec![0xe9]), in invalid_utf8_strict_option_short_space()
44 OsString::from(""), in invalid_utf8_strict_option_short_equals()
45 OsString::from_vec(vec![0x2d, 0x61, 0x3d, 0xe9]), in invalid_utf8_strict_option_short_equals()
61 OsString::from(""), in invalid_utf8_strict_option_short_no_space()
62 OsString::from_vec(vec![0x2d, 0x61, 0xe9]), in invalid_utf8_strict_option_short_no_space()
78 OsString::from(""), in invalid_utf8_strict_option_long_space()
[all …]
Dutf16.rs8 use std::ffi::OsString;
13 fn bad_osstring(ascii: &[u8]) -> OsString { in bad_osstring() argument
18 let os = OsString::from_wide(&wide_chars); in bad_osstring()
26 .arg(arg!(<arg> "some arg").value_parser(value_parser!(OsString))) in invalid_utf16_positional()
27 .try_get_matches_from(vec![OsString::from(""), bad_osstring(b"")]); in invalid_utf16_positional()
31 assert_eq!(&*m.get_one::<OsString>("arg").unwrap(), &*bad_osstring(b"")); in invalid_utf16_positional()
37 .arg(arg!(-a --arg <arg> "some arg").value_parser(value_parser!(OsString))) in invalid_utf16_option_short_space()
39 OsString::from(""), in invalid_utf16_option_short_space()
40 OsString::from("-a"), in invalid_utf16_option_short_space()
46 assert_eq!(&*m.get_one::<OsString>("arg").unwrap(), &*bad_osstring(b"")); in invalid_utf16_option_short_space()
[all …]
/third_party/rust/crates/nix/test/sys/
Dtest_inotify.rs3 use std::ffi::OsString;
21 assert_eq!(events[0].name, Some(OsString::from("test"))); in test_inotify()
50 assert_eq!(events[0].name, Some(OsString::from("test"))); in test_inotify_multi_events()
53 assert_eq!(events[1].name, Some(OsString::from("test"))); in test_inotify_multi_events()
56 assert_eq!(events[2].name, Some(OsString::from("test"))); in test_inotify_multi_events()
59 assert_eq!(events[3].name, Some(OsString::from("test"))); in test_inotify_multi_events()
62 assert_eq!(events[4].name, Some(OsString::from("test2"))); in test_inotify_multi_events()
/third_party/rust/crates/clap/src/builder/
Dos_str.rs14 pub(crate) fn from_string(name: std::ffi::OsString) -> Self { in from_string()
39 pub fn to_os_string(&self) -> std::ffi::OsString { in to_os_string() argument
84 impl From<std::ffi::OsString> for OsStr {
85 fn from(name: std::ffi::OsString) -> Self { in from()
91 impl From<&'_ std::ffi::OsString> for OsStr {
92 fn from(name: &'_ std::ffi::OsString) -> Self { in from()
135 impl From<OsStr> for std::ffi::OsString { implementation
143 std::ffi::OsString::from(name).into() in from()
236 impl PartialEq<std::ffi::OsString> for OsStr {
238 fn eq(&self, other: &std::ffi::OsString) -> bool { in eq()
[all …]
Dvalue_parser.rs67 OsString, enumerator
192 Self(ValueParserInner::OsString) in os_string()
253 ValueParserInner::OsString => &OsStringValueParser {}, in any_value_parser()
551 ValueParserInner::OsString => f.debug_struct("ValueParser::os_string").finish(), in fmt()
563 ValueParserInner::OsString => ValueParserInner::OsString, in clone()
583 value: std::ffi::OsString, in parse() argument
615 value: std::ffi::OsString, in parse() argument
706 value: std::ffi::OsString, in parse() argument
876 value: std::ffi::OsString, in parse() argument
909 type Value = std::ffi::OsString;
[all …]
/third_party/rust/crates/clap/src/parser/matches/
Dmatched_arg.rs3 ffi::{OsStr, OsString},
21 raw_vals: Vec<Vec<OsString>>,
94 pub(crate) fn raw_vals(&self) -> Iter<Vec<OsString>> { in raw_vals() argument
98 pub(crate) fn raw_vals_flatten(&self) -> Flatten<Iter<Vec<OsString>>> { in raw_vals_flatten() argument
107 pub(crate) fn first_raw(&self) -> Option<&OsString> { in first_raw() argument
116 pub(crate) fn append_val(&mut self, val: AnyValue, raw_val: OsString) { in append_val() argument
150 OsString::as_os_str(v) == OsStr::new(val) in check_explicit()
223 assert_eq!(m.first_raw(), Some(&OsString::from("bbb"))); in test_grouped_vals_first()
Darg_matches.rs3 use std::ffi::{OsStr, OsString};
1135 iter: values.map(OsString::as_os_str), in try_get_raw()
1153 iter: g.iter().map(OsString::as_os_str), in try_get_raw_occurrences()
1527 iter: Map<Flatten<Iter<'a, Vec<OsString>>>, fn(&OsString) -> &OsStr>,
1553 static EMPTY: [Vec<OsString>; 0] = []; in default()
1744 iter: Map<Iter<'a, Vec<OsString>>, fn(&Vec<OsString>) -> RawOccurrenceValues<'_>>,
1769 static EMPTY: [Vec<OsString>; 0] = []; in default()
1779 iter: Map<Iter<'a, OsString>, fn(&OsString) -> &OsStr>,
1946 .get_many::<std::ffi::OsString>("POTATO") in os_values_exact_size()
/third_party/rust/crates/clap/examples/
Dgit-derive.rs2 use std::ffi::OsString;
27 base: Option<OsString>,
29 head: Option<OsString>,
31 path: Option<OsString>,
58 External(Vec<OsString>),
/third_party/rust/crates/clap/src/
Dderive.rs7 use std::ffi::OsString;
105 T: Into<OsString> + Clone, in parse_from()
124 T: Into<OsString> + Clone, in try_parse_from()
134 T: Into<OsString> + Clone, in update_from()
150 T: Into<OsString> + Clone, in try_update_from()
409 It: Into<OsString> + Clone, in parse_from()
417 It: Into<OsString> + Clone, in try_parse_from()
/third_party/rust/crates/libloading/src/
Dlib.rs54 use std::ffi::{OsStr, OsString};
73 pub fn library_filename<S: AsRef<OsStr>>(name: S) -> OsString { in library_filename() argument
75 let mut string = OsString::with_capacity(name.len() + DLL_PREFIX.len() + DLL_SUFFIX.len()); in library_filename()
/third_party/rust/crates/clap/tests/derive_ui/
Dexternal_subcommand_wrong_type.stderr1 error: The type must be either `Vec<String>` or `Vec<OsString>` to be used with `external_subcomman…
7 error: The type must be either `Vec<String>` or `Vec<OsString>` to be used with `external_subcomman…
13 …ommand` must be a single-typed tuple, and the type must be either `Vec<String>` or `Vec<OsString>`.
/third_party/rust/crates/os_str_bytes/src/windows/
Dmod.rs8 use std::ffi::OsString;
62 fn from_bytes(string: &[u8]) -> Result<Option<OsString>> { in from_bytes() argument
102 pub(super) fn os_string_from_vec(string: Vec<u8>) -> Result<OsString> { in os_string_from_vec() argument
111 pub(super) fn os_string_into_vec(os_string: OsString) -> Vec<u8> { in os_string_into_vec()
/third_party/rust/crates/os_str_bytes/src/
Dlib.rs186 use std::ffi::OsString;
564 impl OsStringBytes for OsString { implementation
584 OsString::assert_from_raw_vec(string).into() in assert_from_raw_vec()
589 OsString::from_raw_vec(string).map(Into::into) in from_raw_vec()
600 use std::ffi::OsString;
614 impl Sealed for OsString {} implementation
/third_party/rust/crates/os_str_bytes/src/common/
Dmod.rs4 use std::ffi::OsString;
37 pub(super) fn os_string_from_vec(string: Vec<u8>) -> Result<OsString> { in os_string_from_vec() argument
41 pub(super) fn os_string_into_vec(os_string: OsString) -> Vec<u8> { in os_string_into_vec()
/third_party/rust/crates/os_str_bytes/src/wasm/
Dmod.rs4 use std::ffi::OsString;
50 pub(super) fn os_string_from_vec(string: Vec<u8>) -> Result<OsString> { in os_string_from_vec() argument
56 pub(super) fn os_string_into_vec(os_string: OsString) -> Vec<u8> { in os_string_into_vec()
/third_party/rust/crates/clap/clap_complete/src/
Ddynamic.rs5 use std::ffi::OsString;
60 comp_words: Vec<OsString>,
292 args: Vec<std::ffi::OsString>, in complete() argument
297 ) -> Result<Vec<std::ffi::OsString>, std::io::Error> { in complete() argument
360 ) -> Result<Vec<std::ffi::OsString>, std::io::Error> { in complete_arg() argument
434 ) -> Vec<OsString> { in complete_arg_value() argument
491 ) -> Vec<OsString> { in complete_path() argument
535 fn complete_subcommand(value: &str, cmd: &clap::Command) -> Vec<OsString> { in complete_subcommand() argument
545 .map(|x| OsString::from(&x.0)) in complete_subcommand()
/third_party/rust/crates/clap/clap_complete/tests/
Ddynamic.rs14 .map(std::ffi::OsString::from) in suggest_subcommand_subset()
60 .map(std::ffi::OsString::from) in suggest_long_flag_subset()
95 .map(std::ffi::OsString::from) in suggest_possible_value_subset()
141 .map(std::ffi::OsString::from) in suggest_additional_short_flags()
/third_party/rust/crates/rust-openssl/openssl-sys/build/
Dfind_normal.rs1 use std::ffi::OsString;
72 fn find_openssl_dir(target: &str) -> OsString { in find_openssl_dir() argument
97 return OsString::from("/usr"); in find_openssl_dir()
102 return OsString::from("/usr/local"); in find_openssl_dir()
/third_party/rust/crates/autocfg/src/
Dlib.rs63 use std::ffi::OsString;
87 target: Option<OsString>,
393 target: &Option<OsString>, in dir_contains_target() argument
395 cargo_target_dir: Option<OsString>, in dir_contains_target() argument
414 fn rustflags(target: &Option<OsString>, dir: &Path) -> Vec<String> { in rustflags() argument
/third_party/rust/crates/os_str_bytes/tests/
Dcommon.rs15 use std::ffi::OsString;
53 pub(crate) fn from_vec(string: Vec<u8>) -> Result<OsString> {
54 let os_string = OsString::from_raw_vec(string.clone());
Drandom_common.rs3 use std::ffi::OsString;
19 ) -> Result<OsString, getrandom::Error> { in random_os_string() argument
/third_party/rust/crates/clap/clap_lex/src/
Dlib.rs111 use std::ffi::OsString;
121 items: Vec<OsString>,
157 pub fn new(iter: impl IntoIterator<Item = impl Into<std::ffi::OsString>>) -> Self { in new()
235 insert_items: impl IntoIterator<Item = impl Into<OsString>>, in insert()
252 T: Into<OsString>,
/third_party/rust/crates/os_str_bytes/
DREADME.md4 [`OsString`], without resorting to panics or corruption for invalid UTF-8.
8 Typically, the only way to losslessly construct [`OsStr`] or [`OsString`] from
102 [`OsString`]: https://doc.rust-lang.org/std/ffi/struct.OsString.html
/third_party/rust/crates/clap/clap_complete/src/generator/
Dmod.rs5 use std::ffi::OsString;
174 T: Into<OsString>, in generate_to() argument

123