pub struct BStr<'pool> { /* private fields */ }Expand description
Borrowed view of an SVN string tied to pool lifetime
Implementations§
Source§impl<'pool> BStr<'pool>
impl<'pool> BStr<'pool>
Sourcepub fn from_raw(ptr: *const svn_string_t) -> Self
pub fn from_raw(ptr: *const svn_string_t) -> Self
Create from raw SVN string pointer
Sourcepub fn from_bytes(data: &[u8], pool: &'pool Pool<'pool>) -> Self
pub fn from_bytes(data: &[u8], pool: &'pool Pool<'pool>) -> Self
Create SVN string in pool from bytes
Sourcepub fn as_ptr(&self) -> *const svn_string_t
pub fn as_ptr(&self) -> *const svn_string_t
Gets the raw pointer to the SVN string.
Sourcepub fn as_mut_ptr(&mut self) -> *mut svn_string_t
pub fn as_mut_ptr(&mut self) -> *mut svn_string_t
Gets a mutable raw pointer to the SVN string.
Sourcepub fn to_string_lossy(&self) -> String
pub fn to_string_lossy(&self) -> String
Convert to owned String, replacing invalid UTF-8
Auto Trait Implementations§
impl<'pool> Freeze for BStr<'pool>
impl<'pool> RefUnwindSafe for BStr<'pool>
impl<'pool> !Send for BStr<'pool>
impl<'pool> !Sync for BStr<'pool>
impl<'pool> Unpin for BStr<'pool>
impl<'pool> UnsafeUnpin for BStr<'pool>
impl<'pool> UnwindSafe for BStr<'pool>
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