Struct QueryParameters

Source
pub struct QueryParameters<'a> {
    pub consistency: Consistency,
    pub serial_consistency: Option<SerialConsistency>,
    pub timestamp: Option<i64>,
    pub page_size: Option<i32>,
    pub paging_state: PagingState,
    pub skip_metadata: bool,
    pub values: Cow<'a, SerializedValues>,
}
Expand description

Various parameters controlling the execution of the statement.

Fields§

§consistency: Consistency

Consistency level for the query.

§serial_consistency: Option<SerialConsistency>

Serial consistency level for the query, if specified.

§timestamp: Option<i64>

Client-side-assigned timestamp for the query, if specified.

§page_size: Option<i32>

Maximum number of rows to return for the query, if specified. If not specified, the server will not page the result, and instead return all rows in a single response. This is not recommended for large result sets, as it puts a lot of pressure on the server and network, as well as brings high memory usage on both client and server sides.

§paging_state: PagingState

Paging state for the query, used to resume fetching results from a previous query. If empty paging state is provided, the query will start from the beginning.

§skip_metadata: bool

Whether to skip metadata for the values in the result set. This is an optimisation that can be used when the client does not need the metadata for the values, because it has already been fetched upon preparing the statement.

§values: Cow<'a, SerializedValues>

Values bound to the statements.

Implementations§

Source§

impl QueryParameters<'_>

Source

pub fn serialize( &self, buf: &mut impl BufMut, ) -> Result<(), QueryParametersSerializationError>

Serializes the parameters into the provided buffer.

Source§

impl QueryParameters<'_>

Source

pub fn deserialize(buf: &mut &[u8]) -> Result<Self, RequestDeserializationError>

Deserializes the parameters from the provided buffer.

Trait Implementations§

Source§

impl Default for QueryParameters<'_>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for QueryParameters<'a>

§

impl<'a> RefUnwindSafe for QueryParameters<'a>

§

impl<'a> Send for QueryParameters<'a>

§

impl<'a> Sync for QueryParameters<'a>

§

impl<'a> Unpin for QueryParameters<'a>

§

impl<'a> UnwindSafe for QueryParameters<'a>

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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<T> ErasedDestructor for T
where T: 'static,