Struct leptonica_plumbing::Str
source · pub struct Str { /* private fields */ }
Expand description
Wrapper for heap allocated leptonica strings
Implementations§
source§impl Str
impl Str
sourcepub unsafe fn new_from_pointer(pointer: *mut c_char) -> Self
pub unsafe fn new_from_pointer(pointer: *mut c_char) -> Self
Create a new Str from a heap allocated c-string pointer
Safety
The pointer must be to a valid heap allocated c-string. The data pointed at may not be mutated while held by this struct except by this struct. On drop, the pointer will be freed.
pub fn to_str(&self) -> Result<&str, Utf8Error>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Str
impl !Send for Str
impl !Sync for Str
impl Unpin for Str
impl UnwindSafe for Str
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more