Skip to main content

Str

Trait Str 

Source
pub trait Str {
    // Required methods
    fn open_elf(&self) -> Option<isize>;
    fn from_null_terminated_pointer(ptr: *const u8) -> Self;
    fn from_pointer(ptr: *const u8, len: usize) -> Self;
    fn from_slice(slice: &[u8]) -> Self;
    fn terminate(&mut self);
}

Required Methods§

Source

fn open_elf(&self) -> Option<isize>

Source

fn from_null_terminated_pointer(ptr: *const u8) -> Self

Source

fn from_pointer(ptr: *const u8, len: usize) -> Self

Source

fn from_slice(slice: &[u8]) -> Self

Source

fn terminate(&mut self)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Str for &str

Source§

fn open_elf(&self) -> Option<isize>

Source§

fn from_null_terminated_pointer(ptr: *const u8) -> Self

Source§

fn from_pointer(ptr: *const u8, _len: usize) -> Self

Source§

fn from_slice(slice: &[u8]) -> Self

Source§

fn terminate(&mut self)

Implementors§