pub trait AsPtr {
type Inner;
// Required methods
fn as_ptr(&self) -> *const Self::Inner;
fn as_mut_ptr(&mut self) -> *mut Self::Inner;
// Provided methods
fn size(&self) -> usize { ... }
fn as_bytes(&self) -> &[u8] ⓘ { ... }
fn as_bytes_mut(&mut self) -> &[u8] ⓘ { ... }
}
Expand description
Trait to get a pointer to an inner type
Required Associated Types§
Required Methods§
Sourcefn as_mut_ptr(&mut self) -> *mut Self::Inner
fn as_mut_ptr(&mut self) -> *mut Self::Inner
Gets a mutable pointer to the inner type
Provided Methods§
Sourcefn as_bytes_mut(&mut self) -> &[u8] ⓘ
fn as_bytes_mut(&mut self) -> &[u8] ⓘ
Gets a mutable byte slice to the inner type