[−][src]Enum sanakirja::value::UnsafeValue
Unsafe values, the unsafe representation of a value.
Variants
A "direct" value, i.e. a value stored inline in tree pages. These values are limited to at most 506 bytes.
Fields of Direct
A "large" value, stored on a linked list of pages.
Fields of Large
Implementations
impl UnsafeValue
[src]
pub fn len(&self) -> u64
[src]
Length of this unsafe value
pub unsafe fn as_slice<'a>(&self) -> &'a [u8]
[src]
Unsafely turn this value into a slice, if it is inlined on a page. Panics else.
pub fn from_slice(slice: &[u8]) -> UnsafeValue
[src]
Converts a slice of bytes into an unsafe value.
pub fn alloc_if_needed<E: Borrow<Env<Exclusive>>, T>(
txn: &mut MutTxn<E, T>,
value: &[u8]
) -> Result<UnsafeValue, Error>
[src]
txn: &mut MutTxn<E, T>,
value: &[u8]
) -> Result<UnsafeValue, Error>
Allocates a large value if needed, or else return a pointer to the given slice.
Trait Implementations
impl Clone for UnsafeValue
[src]
pub fn clone(&self) -> UnsafeValue
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for UnsafeValue
[src]
impl Debug for UnsafeValue
[src]
impl Representable for UnsafeValue
[src]
pub fn onpage_size(&self) -> u16
[src]
pub unsafe fn write_value(&self, ptr: *mut u8)
[src]
pub unsafe fn read_value(ptr: *const u8) -> Self
[src]
pub unsafe fn cmp_value<T: LoadPage>(&self, txn: &T, y: Self) -> Ordering
[src]
pub fn drop_value<E: Borrow<Env<Exclusive>>, T, R>(
&self,
txn: &mut MutTxn<E, T>,
_: &mut R
) -> Result<(), Error>
[src]
&self,
txn: &mut MutTxn<E, T>,
_: &mut R
) -> Result<(), Error>
type PageOffsets = IntoIter<u64>
An iterator over the offsets to pages contained in this
value. Only values from this crate can generate non-empty
iterators, but combined values (like tuples) must chain the
iterators returned by method page_offsets
. Read more
pub fn page_offsets(&self) -> Self::PageOffsets
[src]
pub fn alignment() -> Alignment
[src]
pub unsafe fn skip(p: *mut u8) -> *mut u8
[src]
Auto Trait Implementations
impl RefUnwindSafe for UnsafeValue
[src]
impl !Send for UnsafeValue
[src]
impl !Sync for UnsafeValue
[src]
impl Unpin for UnsafeValue
[src]
impl UnwindSafe for UnsafeValue
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,