Struct CassResult

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

The result of a query. A result object is read-only and is thread-safe to read or iterate over concurrently, since we do not bind any setters (e.g., set_metadata).

Implementations§

Source§

impl CassResult

Source

pub fn row_count(&self) -> u64

Gets the number of rows for the specified result.

Source

pub fn column_count(&self) -> u64

Gets the number of columns per row for the specified result.

Source

pub fn column_name(&self, index: usize) -> Result<&str>

Gets the column name at index for the specified result.

Source

pub fn column_type(&self, index: usize) -> ValueType

Gets the column type at index for the specified result.

Source

pub fn column_data_type(&self, index: usize) -> ConstDataType<'_>

Gets the column datatype at index for the specified result.

Source

pub fn first_row(&self) -> Option<Row<'_>>

Gets the first row of the result.

Source

pub fn has_more_pages(&self) -> bool

Returns true if there are more pages.

Source

pub fn paging_state_token(&self) -> Result<Option<Vec<u8>>>

Gets the statement’s paging state. This can be used to get the next page of data in a multi-page query, by using set_paging_state_token.

Returns:

  • Ok(None) if there are no more pages, and thus no paging state token.
  • Ok(Some(Vec<u8>)) if there are more pages, and a paging state token.
  • Err(_) if there was an error getting the paging state token.
Source

pub fn iter(&self) -> ResultIterator<'_>

Creates a new iterator for the specified result. This can be used to iterate over rows in the result.

Trait Implementations§

Source§

impl Debug for CassResult

Source§

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

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

impl Display for CassResult

Source§

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

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

impl Drop for CassResult

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for CassResult

Source§

impl Sync for CassResult

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,