Expand description
A pointer to a null-terminated string of 8-bit Windows (ANSI) characters.
Tuple Fields
0: *mut u8
Implementations
impl PSTR
impl PSTR
pub fn null() -> Self
pub fn null() -> Self
Construct a null PSTR
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 PSTR
’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 PSTR
impl Eq for PSTR
impl StructuralEq for PSTR
impl StructuralPartialEq for PSTR
Auto Trait Implementations
impl RefUnwindSafe for PSTR
impl !Send for PSTR
impl !Sync for PSTR
impl Unpin for PSTR
impl UnwindSafe for PSTR
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