#[repr(transparent)]pub struct DbInfo(pub MiscAllocation);
Expand description
Wrapper for allocated string data returned by Database::info()
.
Tuple Fields§
§0: MiscAllocation
Implementations§
Source§impl DbInfo
impl DbInfo
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Return a view of the allocated string data.
Vectorscan will always return valid UTF-8 data for this string, so it skips the validity check. Note that the returned string does not include the trailing null byte allocated by the underlying vectorscan library.
Sourcepub fn extract_db_info(db: &Database) -> Result<Self, VectorscanRuntimeError>
pub fn extract_db_info(db: &Database) -> Result<Self, VectorscanRuntimeError>
Write out metadata for db
into a newly allocated region.
Trait Implementations§
Source§impl Ord for DbInfo
impl Ord for DbInfo
Source§impl PartialOrd for DbInfo
impl PartialOrd for DbInfo
impl Eq for DbInfo
Auto Trait Implementations§
impl Freeze for DbInfo
impl RefUnwindSafe for DbInfo
impl Send for DbInfo
impl !Sync for DbInfo
impl Unpin for DbInfo
impl UnwindSafe for DbInfo
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.