Struct Value

Source
pub struct Value<'a>(/* private fields */);
Expand description

A single primitive value or a collection of values.

Implementations§

Source§

impl<'a> Value<'a>

Source

pub fn get_bytes(&self) -> Result<&'a [u8]>

Get the raw bytes of this Cassandra value.

Source

pub fn get_type(&self) -> ValueType

Get the type of this Cassandra value

Source

pub fn data_type(&self) -> ConstDataType<'a>

Get the data type of this Cassandra value

Source

pub fn is_null(&self) -> bool

Returns true if a specified value is null.

Source

pub fn is_collection(&self) -> bool

Returns true if a specified value is a collection.

Source

pub fn get_set(&self) -> Result<SetIterator<'a>>

Gets this value as a set / list / tuple iterator (the same method works for any of these).

Source

pub fn get_map(&self) -> Result<MapIterator<'a>>

Gets this value as a map iterator.

Source

pub fn get_user_type(&self) -> Result<UserTypeIterator<'a>>

Gets an iterator over the fields of the user type in this column or errors if you ask for the wrong type

Source

pub fn get_str(&self) -> Result<&'a str>

Get this value as a string slice

Source

pub fn get_string(&self) -> Result<String>

Get this value as a string

Source

pub fn get_inet(&self) -> Result<Inet>

Get this value as an Inet

Source

pub fn get_i32(&self) -> Result<i32>

Get this value as an i32

Source

pub fn get_u32(&self) -> Result<u32>

Get this value as a u32

Source

pub fn get_i16(&self) -> Result<i16>

Get this value as an i16

Source

pub fn get_i8(&self) -> Result<i8>

Get this value as an i8

Source

pub fn get_i64(&self) -> Result<i64>

Get this value as an i64

Source

pub fn get_f32(&self) -> Result<f32>

Get this value as a float

Source

pub fn get_f64(&self) -> Result<f64>

Get this value as a double

Source

pub fn get_bool(&self) -> Result<bool>

Get this value as a boolean

Source

pub fn get_uuid(&self) -> Result<Uuid>

Get this value as a UUID

Source

pub fn get_decimal(&self) -> Result<BigDecimal>

Get this value as a BigDecimal

Trait Implementations§

Source§

impl Debug for Value<'_>

Source§

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

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

impl Display for Value<'_>

Source§

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

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

impl Send for Value<'_>

Source§

impl Sync for Value<'_>

Auto Trait Implementations§

§

impl<'a> Freeze for Value<'a>

§

impl<'a> RefUnwindSafe for Value<'a>

§

impl<'a> Unpin for Value<'a>

§

impl<'a> UnwindSafe for Value<'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> 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,