Struct discord_cassandra_cpp::DataType
source · [−]pub struct DataType(_);
Expand description
Any cassandra datatype
Implementations
sourceimpl DataType
impl DataType
sourcepub fn new_user_type(&self) -> UserType
pub fn new_user_type(&self) -> UserType
Creates a new data type from an existing data type.
sourcepub fn new_from_existing(&self) -> Self
pub fn new_from_existing(&self) -> Self
Creates a new data type from an existing data type.
sourcepub fn new_udt(field_count: usize) -> DataType
pub fn new_udt(field_count: usize) -> DataType
Creates a new UDT (user defined type) data type.
sourcepub fn get_type(data_type: DataType) -> ValueType
pub fn get_type(data_type: DataType) -> ValueType
Gets the value type of the specified data type.
sourcepub fn type_name<S>(data_type: DataType, type_name: S) -> Result<()> where
S: Into<String>,
pub fn type_name<S>(data_type: DataType, type_name: S) -> Result<()> where
S: Into<String>,
Gets the type name of a UDT data type.
sourcepub fn set_type_name<S>(data_type: DataType, type_name: S) -> Result<()> where
S: Into<String>,
pub fn set_type_name<S>(data_type: DataType, type_name: S) -> Result<()> where
S: Into<String>,
Sets the type name of a UDT data type.
Note: Only valid for UDT data types.
sourcepub fn keyspace<S>(data_type: DataType, keyspace: S) -> Result<()> where
S: Into<String>,
pub fn keyspace<S>(data_type: DataType, keyspace: S) -> Result<()> where
S: Into<String>,
Gets the type name of a UDT data type.
Note: Only valid for UDT data types.
sourcepub fn set_keyspace<S>(data_type: DataType, keyspace: S) -> Result<()> where
S: Into<String>,
pub fn set_keyspace<S>(data_type: DataType, keyspace: S) -> Result<()> where
S: Into<String>,
Sets the keyspace of a UDT data type.
Note: Only valid for UDT data types.
sourcepub fn class_name<S>(data_type: DataType, class_name: S) -> Result<()> where
S: Into<String>,
pub fn class_name<S>(data_type: DataType, class_name: S) -> Result<()> where
S: Into<String>,
Gets the class name of a custom data type.
Note: Only valid for custom data types.
sourcepub fn set_class_name<S>(&self, class_name: S) -> Result<()> where
S: Into<String>,
pub fn set_class_name<S>(&self, class_name: S) -> Result<()> where
S: Into<String>,
Sets the class name of a custom data type.
Note: Only valid for custom data types.
sourcepub fn sub_type_count<S>(&self) -> usize
pub fn sub_type_count<S>(&self) -> usize
Gets the sub-data type count of a UDT (user defined type), tuple or collection.
Note: Only valid for UDT, tuple and collection data types.
sourcepub fn sub_data_type(&self, index: usize) -> ConstDataType
pub fn sub_data_type(&self, index: usize) -> ConstDataType
Gets the sub-data type of a UDT (user defined type), tuple or collection at the specified index.
Note: Only valid for UDT, tuple and collection data types.
sourcepub fn sub_data_type_by_name<S>(data_type: DataType, name: S) -> ConstDataType where
S: Into<String>,
pub fn sub_data_type_by_name<S>(data_type: DataType, name: S) -> ConstDataType where
S: Into<String>,
Gets the sub-data type of a UDT (user defined type) at the specified index.
Note: Only valid for UDT data types.
sourcepub fn sub_type_name<S>(
data_type: DataType,
index: usize,
name: S
) -> Result<()> where
S: Into<String>,
pub fn sub_type_name<S>(
data_type: DataType,
index: usize,
name: S
) -> Result<()> where
S: Into<String>,
Gets the sub-type name of a UDT (user defined type) at the specified index.
Note: Only valid for UDT data types.
sourcepub fn add_sub_type(&self, sub_data_type: DataType) -> Result<()>
pub fn add_sub_type(&self, sub_data_type: DataType) -> Result<()>
Adds a sub-data type to a tuple or collection.
Note: Only valid for tuple and collection data types.
sourcepub fn add_sub_type_by_name<S>(
&mut self,
name: S,
sub_data_type: DataType
) -> Result<()> where
S: Into<String>,
pub fn add_sub_type_by_name<S>(
&mut self,
name: S,
sub_data_type: DataType
) -> Result<()> where
S: Into<String>,
Gets the sub-data type of a UDT (user defined type) at the specified index.
Note: Only valid for UDT data types.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DataType
impl !Sync for DataType
impl Unpin for DataType
impl UnwindSafe for DataType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more