Lines Matching defs:OsStr

8 pub struct OsStr {
12 impl OsStr {
21 pub(crate) fn from_ref(name: &std::ffi::OsStr) -> Self {
27 pub(crate) fn from_static_ref(name: &'static std::ffi::OsStr) -> Self {
33 /// Get the raw string as an `std::ffi::OsStr`
34 pub fn as_os_str(&self) -> &std::ffi::OsStr {
44 impl From<&'_ OsStr> for OsStr {
45 fn from(id: &'_ OsStr) -> Self {
51 impl From<Str> for OsStr {
54 crate::builder::StrInner::Static(s) => Self::from_static_ref(std::ffi::OsStr::new(s)),
55 crate::builder::StrInner::Owned(s) => Self::from_ref(std::ffi::OsStr::new(s.as_ref())),
61 impl From<Str> for OsStr {
63 Self::from_static_ref(std::ffi::OsStr::new(id.into_inner().0))
68 impl From<&'_ Str> for OsStr {
71 crate::builder::StrInner::Static(s) => Self::from_static_ref(std::ffi::OsStr::new(s)),
72 crate::builder::StrInner::Owned(s) => Self::from_ref(std::ffi::OsStr::new(s.as_ref())),
77 impl From<&'_ Str> for OsStr {
84 impl From<std::ffi::OsString> for OsStr {
91 impl From<&'_ std::ffi::OsString> for OsStr {
98 impl From<std::string::String> for OsStr {
105 impl From<&'_ std::string::String> for OsStr {
111 impl From<&'static std::ffi::OsStr> for OsStr {
112 fn from(name: &'static std::ffi::OsStr) -> Self {
117 impl From<&'_ &'static std::ffi::OsStr> for OsStr {
118 fn from(name: &'_ &'static std::ffi::OsStr) -> Self {
123 impl From<&'static str> for OsStr {
129 impl From<&'_ &'static str> for OsStr {
135 impl From<OsStr> for std::ffi::OsString {
136 fn from(name: OsStr) -> Self {
141 impl From<OsStr> for std::path::PathBuf {
142 fn from(name: OsStr) -> Self {
147 impl std::fmt::Debug for OsStr {
154 impl std::ops::Deref for OsStr {
155 type Target = std::ffi::OsStr;
158 fn deref(&self) -> &std::ffi::OsStr {
163 impl AsRef<std::ffi::OsStr> for OsStr {
165 fn as_ref(&self) -> &std::ffi::OsStr {
170 impl AsRef<std::path::Path> for OsStr {
177 impl std::borrow::Borrow<std::ffi::OsStr> for OsStr {
179 fn borrow(&self) -> &std::ffi::OsStr {
184 impl PartialEq<str> for OsStr {
190 impl PartialEq<OsStr> for str {
192 fn eq(&self, other: &OsStr) -> bool {
197 impl PartialEq<&'_ str> for OsStr {
203 impl PartialEq<OsStr> for &'_ str {
205 fn eq(&self, other: &OsStr) -> bool {
210 impl PartialEq<&'_ std::ffi::OsStr> for OsStr {
212 fn eq(&self, other: &&std::ffi::OsStr) -> bool {
216 impl PartialEq<OsStr> for &'_ std::ffi::OsStr {
218 fn eq(&self, other: &OsStr) -> bool {
223 impl PartialEq<std::string::String> for OsStr {
229 impl PartialEq<OsStr> for std::string::String {
231 fn eq(&self, other: &OsStr) -> bool {
236 impl PartialEq<std::ffi::OsString> for OsStr {
242 impl PartialEq<OsStr> for std::ffi::OsString {
244 fn eq(&self, other: &OsStr) -> bool {
253 Static(&'static std::ffi::OsStr),
254 Owned(Box<std::ffi::OsStr>),
262 pub(crate) fn from_ref(name: &std::ffi::OsStr) -> Self {
266 pub(crate) fn from_static_ref(name: &'static std::ffi::OsStr) -> Self {
270 pub(crate) fn as_os_str(&self) -> &std::ffi::OsStr {
286 pub(crate) struct Inner(&'static std::ffi::OsStr);
289 pub(crate) fn from_static_ref(name: &'static std::ffi::OsStr) -> Self {
293 pub(crate) fn as_os_str(&self) -> &std::ffi::OsStr {
307 Self::from_static_ref(std::ffi::OsStr::new(""))