Skip to main content

Reservation

Struct Reservation 

Source
pub struct Reservation(/* private fields */);
Expand description

A request for SQLite to allocate a blob of a certain size.

When a Reservation is used as a prepared statement parameter, SQLite will create a BLOB of the requested length and set every byte in the blob to \0.

Implementations§

Source§

impl Reservation

Source

pub const fn new(bytes: isize) -> Self

Create a Reservation.

Source

pub const fn len(&self) -> usize

The number of bytes to reserve, as a usize.

Source

pub const fn into_inner(self) -> isize

The number of bytes to reserve, as an isize.

Trait Implementations§

Source§

impl<'b> Bind<'b> for Reservation

Source§

type Value = Reservation

A type directly handled by the SQLite parameter binding API.
Source§

fn into_bind_value(self) -> Result<Self::Value>

Convert self into a directly bindable type. Read more
Source§

impl<'b> Bind<'b> for Reservation

When a Reservation is used as a prepared statement parameter, SQLite will create a BLOB of the requested length and set every byte in the blob to \0.

Source§

unsafe fn bind_parameter<'c>( self, statement: &Statement<'c>, index: BindIndex, ) -> Result<()>
where 'c: 'b,

Bind self as a SQLite prepared statement parameter. Read more
Source§

unsafe fn bind_return<'c>(self, context: &ContextRef<'c>)
where 'b: 'c,

Available on crate feature functions only.
Bind self as the return value of a SQLite function. Read more
Source§

impl Clone for Reservation

Source§

fn clone(&self) -> Reservation

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 Reservation

Source§

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

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

impl<T> From<T> for Reservation
where isize: From<T>,

Source§

fn from(value: T) -> Self

Converts to this type from the input type.
Source§

impl Ord for Reservation

Source§

fn cmp(&self, other: &Reservation) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Reservation

Source§

fn eq(&self, other: &Reservation) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Reservation

Source§

fn partial_cmp(&self, other: &Reservation) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for Reservation

Source§

impl Eq for Reservation

Source§

impl StructuralPartialEq for Reservation

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<'s, T> Parameters<'s> for T
where T: Bind<'s>,

Source§

type Indexes = ()

Source§

fn resolve<'c>( _statement: &Statement<'c>, ) -> Option<<T as Parameters<'s>>::Indexes>

Source§

fn bind<'c>( self, binding: &mut Binding<'c, 's>, _indexes: <T as Parameters<'s>>::Indexes, ) -> Result<(), Error>
where 'c: 's,

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.