[−][src]Struct cstrptr::CStrPtr
Methods
impl<'a> CStrPtr<'a>
[src]
pub const fn from_c_str(str: &'a CStr) -> Self
[src]
pub const unsafe fn from_ptr(ptr: *const c_char) -> Self
[src]
pub fn from_bytes_with_nul(
bytes: &'a [u8]
) -> Result<Self, FromBytesWithNulError>
[src]
bytes: &'a [u8]
) -> Result<Self, FromBytesWithNulError>
pub const unsafe fn from_bytes_with_nul_unchecked(bytes: &'a [u8]) -> Self
[src]
pub const fn as_ptr(self) -> *const c_char
[src]
pub fn to_bytes(self) -> &'a [u8]
[src]
pub fn to_bytes_with_nul(self) -> &'a [u8]
[src]
pub fn to_c_str(self) -> &'a CStr
[src]
pub fn to_str(self) -> Result<&'a str, Utf8Error>
[src]
pub fn to_string_lossy(self) -> Cow<'a, str>
[src]
Trait Implementations
impl<'a> Send for CStrPtr<'a>
[src]
impl<'a> Eq for CStrPtr<'a>
[src]
impl<'a> Sync for CStrPtr<'a>
[src]
impl<'a> Clone for CStrPtr<'a>
[src]
impl<'a> AsRef<CStr> for CStrPtr<'a>
[src]
impl<'a> PartialOrd<CStrPtr<'a>> for CStrPtr<'a>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a> PartialEq<CStrPtr<'a>> for CStrPtr<'a>
[src]
impl<'a> Ord for CStrPtr<'a>
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'a> From<CStrPtr<'a>> for &'a CStr
[src]
impl<'a> From<&'a CStr> for CStrPtr<'a>
[src]
impl<'a> Copy for CStrPtr<'a>
[src]
Auto Trait Implementations
impl<'a> Unpin for CStrPtr<'a>
impl<'a> UnwindSafe for CStrPtr<'a>
impl<'a> RefUnwindSafe for CStrPtr<'a>
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,