__wt_modify

Struct __wt_modify 

Source
#[repr(C)]
pub struct __wt_modify { pub data: WT_ITEM, pub offset: usize, pub size: usize, }
Expand description

A set of modifications for a value, including a pointer to new data and a length, plus a target offset in the value and an optional length of data in the value to be replaced.

WT_MODIFY structures do not need to be cleared before use.

Fields§

§data: WT_ITEM

New data. The size of the new data may be zero when no new data is provided.

§offset: usize

The zero-based byte offset in the value where the new data is placed.

If the offset is past the end of the value, padding bytes are appended to the value up to the specified offset. If the value is a string (value format \c S), the padding byte is a space. If the value is a raw byte array accessed using a WT_ITEM structure (value format \c u), the padding byte is a nul.

§size: usize

The number of bytes in the value to be replaced.

If the size is zero, no bytes from the value are replaced and the new data is inserted.

If the offset is past the end of the value, the size is ignored.

If the offset plus the size overlaps the end of the previous value, bytes from the offset to the end of the value are replaced and any remaining new data is appended.

Trait Implementations§

Source§

impl Clone for __wt_modify

Source§

fn clone(&self) -> __wt_modify

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wt_modify

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wt_modify

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.