Expand description
A pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters.
Tuple Fields
0: *const u8
Implementations
impl PCSTR
impl PCSTR
pub fn null() -> Self
pub fn null() -> Self
Construct a null PCSTR
pub unsafe fn as_bytes(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
pub unsafe fn as_bytes(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
String data without the trailing 0
Safety
The PCSTR
’s pointer needs to be valid for reads up until and including the next \0
.
pub unsafe fn to_string(&self) -> Result<String, FromUtf8Error>
pub unsafe fn to_string(&self) -> Result<String, FromUtf8Error>
Trait Implementations
impl Copy for PCSTR
impl Eq for PCSTR
impl StructuralEq for PCSTR
impl StructuralPartialEq for PCSTR
Auto Trait Implementations
impl RefUnwindSafe for PCSTR
impl !Send for PCSTR
impl !Sync for PCSTR
impl Unpin for PCSTR
impl UnwindSafe for PCSTR
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more