Lines Matching defs:std

14     pub(crate) fn from_string(name: std::ffi::OsString) -> Self {
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 {
39 pub fn to_os_string(&self) -> std::ffi::OsString {
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())),
63 Self::from_static_ref(std::ffi::OsStr::new(id.into_inner().0))
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())),
84 impl From<std::ffi::OsString> for OsStr {
85 fn from(name: std::ffi::OsString) -> Self {
91 impl From<&'_ std::ffi::OsString> for OsStr {
92 fn from(name: &'_ std::ffi::OsString) -> Self {
98 impl From<std::string::String> for OsStr {
99 fn from(name: std::string::String) -> Self {
105 impl From<&'_ std::string::String> for OsStr {
106 fn from(name: &'_ std::string::String) -> Self {
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 {
135 impl From<OsStr> for std::ffi::OsString {
141 impl From<OsStr> for std::path::PathBuf {
143 std::ffi::OsString::from(name).into()
147 impl std::fmt::Debug for OsStr {
149 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
150 std::fmt::Debug::fmt(self.as_os_str(), f)
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 {
172 fn as_ref(&self) -> &std::path::Path {
173 std::path::Path::new(self)
177 impl std::borrow::Borrow<std::ffi::OsStr> for OsStr {
179 fn borrow(&self) -> &std::ffi::OsStr {
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 {
223 impl PartialEq<std::string::String> for OsStr {
225 fn eq(&self, other: &std::string::String) -> bool {
229 impl PartialEq<OsStr> for std::string::String {
236 impl PartialEq<std::ffi::OsString> for OsStr {
238 fn eq(&self, other: &std::ffi::OsString) -> bool {
242 impl PartialEq<OsStr> for std::ffi::OsString {
253 Static(&'static std::ffi::OsStr),
254 Owned(Box<std::ffi::OsStr>),
258 pub(crate) fn from_string(name: std::ffi::OsString) -> Self {
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 {
277 pub(crate) fn into_os_string(self) -> std::ffi::OsString {
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 {
297 pub(crate) fn into_os_string(self) -> std::ffi::OsString {
307 Self::from_static_ref(std::ffi::OsStr::new(""))
318 fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
324 fn cmp(&self, other: &Inner) -> std::cmp::Ordering {
331 impl std::hash::Hash for Inner {
333 fn hash<H: std::hash::Hasher>(&self, state: &mut H) {