pub trait OsStrConcat {
// Required method
fn concat(self, sep: impl Bytes) -> OsString;
}
Expand description
Required Methods§
Sourcefn concat(self, sep: impl Bytes) -> OsString
fn concat(self, sep: impl Bytes) -> OsString
Concatenates all the strings and places the separator between all elements. The separator can be an empty string.
§Examples
use std::ffi::OsStr;
use osstrtools::OsStrConcat;
let strings: &[&OsStr] = &[OsStr::new("a"),
OsStr::new("b"),
OsStr::new("c")];
let result = strings.concat(" ");
assert_eq!(result, "a b c");
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.