Lines Matching defs:Cow
107 //! Some methods return [`Cow`] to account for platform differences. However,
183 use std::borrow::Cow;
313 ) -> result::Result<Cow<'a, OsStr>, imp::EncodingError>
315 S: Into<Cow<'a, [u8]>>,
318 Cow::Borrowed(string) => imp::os_str_from_bytes(string),
319 Cow::Owned(string) => imp::os_string_from_vec(string).map(Cow::Owned),
323 fn cow_os_str_into_path(string: Cow<'_, OsStr>) -> Cow<'_, Path> {
325 Cow::Borrowed(string) => Cow::Borrowed(Path::new(string)),
326 Cow::Owned(string) => Cow::Owned(string.into()),
363 fn assert_from_raw_bytes<'a, S>(string: S) -> Cow<'a, Self>
365 S: Into<Cow<'a, [u8]>>;
400 fn from_raw_bytes<'a, S>(string: S) -> Result<Cow<'a, Self>>
402 S: Into<Cow<'a, [u8]>>;
423 fn to_raw_bytes(&self) -> Cow<'_, [u8]>;
428 fn assert_from_raw_bytes<'a, S>(string: S) -> Cow<'a, Self>
430 S: Into<Cow<'a, [u8]>>,
436 fn from_raw_bytes<'a, S>(string: S) -> Result<Cow<'a, Self>>
438 S: Into<Cow<'a, [u8]>>,
444 fn to_raw_bytes(&self) -> Cow<'_, [u8]> {
451 fn assert_from_raw_bytes<'a, S>(string: S) -> Cow<'a, Self>
453 S: Into<Cow<'a, [u8]>>,
459 fn from_raw_bytes<'a, S>(string: S) -> Result<Cow<'a, Self>>
461 S: Into<Cow<'a, [u8]>>,
467 fn to_raw_bytes(&self) -> Cow<'_, [u8]> {
605 use std::borrow::Cow;
621 impl Sealed for Cow<'_, RawOsStr> {}