Trait OsStrConcat

Source
pub trait OsStrConcat {
    // Required method
    fn concat(self, sep: impl Bytes) -> OsString;
}
Expand description

Concatenation of things that can be turned into an Iterator of elements that implement Bytes.

Required Methods§

Source

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.

Implementors§

Source§

impl<I> OsStrConcat for I
where I: IntoIterator, I::Item: Bytes + Clone,