pub trait CassCollection: Sized {
type Value;
Show 21 methods
// Required methods
fn with_capacity(capacity: usize) -> Self;
fn new_from_data_type(value: DataType, item_count: usize) -> Self;
fn data_type(&self) -> ConstDataType<'_>;
fn append_int8(&mut self, value: i8) -> Result<&mut Self>;
fn append_int16(&mut self, value: i16) -> Result<&mut Self>;
fn append_int32(&mut self, value: i32) -> Result<&mut Self>;
fn append_uint32(&mut self, value: u32) -> Result<&mut Self>;
fn append_int64(&mut self, value: i64) -> Result<&mut Self>;
fn append_float(&mut self, value: f32) -> Result<&mut Self>;
fn append_double(&mut self, value: f64) -> Result<&mut Self>;
fn append_bool(&mut self, value: bool) -> Result<&mut Self>;
fn append_string(&mut self, value: &str) -> Result<&mut Self>;
fn append_bytes(&mut self, value: Vec<u8>) -> Result<&mut Self>;
fn append_uuid(&mut self, value: Uuid) -> Result<&mut Self>;
fn append_inet(&mut self, value: Inet) -> Result<&mut Self>;
fn append_list(&mut self, value: List) -> Result<&mut Self>;
fn append_set(&mut self, value: Set) -> Result<&mut Self>;
fn append_map(&mut self, value: Map) -> Result<&mut Self>;
fn append_tuple(&mut self, value: Tuple) -> Result<&mut Self>;
fn append_user_type(&mut self, value: &UserType) -> Result<&mut Self>;
// Provided method
fn new() -> Self { ... }
}
Expand description
A generic Cassandra collection that needs to go away
Required Associated Types§
Required Methods§
Sourcefn with_capacity(capacity: usize) -> Self
fn with_capacity(capacity: usize) -> Self
Creates a new collection, specifying a capacity which will be used as a size hint to avoid re-allocations of the collection internally.
If you know the number of items you’ll insert into the collection ahead of time,
it is recommended to use this function over CassCollection::new
.
Sourcefn new_from_data_type(value: DataType, item_count: usize) -> Self
fn new_from_data_type(value: DataType, item_count: usize) -> Self
Creates a new collection from an existing data type.
Sourcefn append_int8(&mut self, value: i8) -> Result<&mut Self>
fn append_int8(&mut self, value: i8) -> Result<&mut Self>
Appends a “tinyint” to the collection.
Sourcefn append_int16(&mut self, value: i16) -> Result<&mut Self>
fn append_int16(&mut self, value: i16) -> Result<&mut Self>
Appends an “smallint” to the collection.
Sourcefn append_int32(&mut self, value: i32) -> Result<&mut Self>
fn append_int32(&mut self, value: i32) -> Result<&mut Self>
Appends an “int” to the collection.
Sourcefn append_uint32(&mut self, value: u32) -> Result<&mut Self>
fn append_uint32(&mut self, value: u32) -> Result<&mut Self>
Appends a “date” to the collection.
Sourcefn append_int64(&mut self, value: i64) -> Result<&mut Self>
fn append_int64(&mut self, value: i64) -> Result<&mut Self>
Appends a “bigint”, “counter”, “timestamp” or “time” to the collection.
Sourcefn append_float(&mut self, value: f32) -> Result<&mut Self>
fn append_float(&mut self, value: f32) -> Result<&mut Self>
Appends a “float” to the collection.
Sourcefn append_double(&mut self, value: f64) -> Result<&mut Self>
fn append_double(&mut self, value: f64) -> Result<&mut Self>
Appends a “double” to the collection.
Sourcefn append_bool(&mut self, value: bool) -> Result<&mut Self>
fn append_bool(&mut self, value: bool) -> Result<&mut Self>
Appends a “boolean” to the collection.
Sourcefn append_string(&mut self, value: &str) -> Result<&mut Self>
fn append_string(&mut self, value: &str) -> Result<&mut Self>
Appends an “ascii”, “text” or “varchar” to the collection.
Sourcefn append_bytes(&mut self, value: Vec<u8>) -> Result<&mut Self>
fn append_bytes(&mut self, value: Vec<u8>) -> Result<&mut Self>
Appends a “blob”, “varint” or “custom” to the collection.
Sourcefn append_uuid(&mut self, value: Uuid) -> Result<&mut Self>
fn append_uuid(&mut self, value: Uuid) -> Result<&mut Self>
Appends a “uuid” or “timeuuid” to the collection.
Sourcefn append_inet(&mut self, value: Inet) -> Result<&mut Self>
fn append_inet(&mut self, value: Inet) -> Result<&mut Self>
Appends an “inet” to the collection.
Sourcefn append_list(&mut self, value: List) -> Result<&mut Self>
fn append_list(&mut self, value: List) -> Result<&mut Self>
Appends a “list” to the collection.
Sourcefn append_set(&mut self, value: Set) -> Result<&mut Self>
fn append_set(&mut self, value: Set) -> Result<&mut Self>
Appends a “set” to the collection.
Sourcefn append_map(&mut self, value: Map) -> Result<&mut Self>
fn append_map(&mut self, value: Map) -> Result<&mut Self>
Appends a “map” to the collection.
Sourcefn append_tuple(&mut self, value: Tuple) -> Result<&mut Self>
fn append_tuple(&mut self, value: Tuple) -> Result<&mut Self>
Appends a “tuple” to the collection.
Sourcefn append_user_type(&mut self, value: &UserType) -> Result<&mut Self>
fn append_user_type(&mut self, value: &UserType) -> Result<&mut Self>
Appends a “udt” to the collection.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.