pub struct Column { /* private fields */ }
Expand description
Represents MySql Column (column packet).
Implementations§
Source§impl Column
impl Column
pub fn new(column_type: ColumnType) -> Column
pub fn with_schema(self, schema: &[u8]) -> Column
pub fn with_table(self, table: &[u8]) -> Column
pub fn with_org_table(self, org_table: &[u8]) -> Column
pub fn with_name(self, name: &[u8]) -> Column
pub fn with_org_name(self, org_name: &[u8]) -> Column
pub fn with_flags(self, flags: ColumnFlags) -> Column
pub fn with_column_length(self, column_length: u32) -> Column
pub fn with_character_set(self, character_set: u16) -> Column
pub fn with_decimals(self, decimals: u8) -> Column
Sourcepub fn column_length(&self) -> u32
pub fn column_length(&self) -> u32
Returns value of the column_length field of a column packet.
Can be used for text-output formatting.
Sourcepub fn column_type(&self) -> ColumnType
pub fn column_type(&self) -> ColumnType
Returns value of the column_type field of a column packet.
Sourcepub fn character_set(&self) -> u16
pub fn character_set(&self) -> u16
Returns value of the character_set field of a column packet.
Sourcepub fn flags(&self) -> ColumnFlags
pub fn flags(&self) -> ColumnFlags
Returns value of the flags field of a column packet.
Sourcepub fn decimals(&self) -> u8
pub fn decimals(&self) -> u8
Returns value of the decimals field of a column packet.
Max shown decimal digits. Can be used for text-output formatting
0x00
for integers and static strings0x1f
for dynamic strings, double, float0x00..=0x51
for decimals
Sourcepub fn schema_ref(&self) -> &[u8] ⓘ
pub fn schema_ref(&self) -> &[u8] ⓘ
Returns value of the schema field of a column packet as a byte slice.
Sourcepub fn schema_str(&self) -> Cow<'_, str>
pub fn schema_str(&self) -> Cow<'_, str>
Returns value of the schema field of a column packet as a string (lossy converted).
Sourcepub fn table_ref(&self) -> &[u8] ⓘ
pub fn table_ref(&self) -> &[u8] ⓘ
Returns value of the table field of a column packet as a byte slice.
Sourcepub fn table_str(&self) -> Cow<'_, str>
pub fn table_str(&self) -> Cow<'_, str>
Returns value of the table field of a column packet as a string (lossy converted).
Sourcepub fn org_table_ref(&self) -> &[u8] ⓘ
pub fn org_table_ref(&self) -> &[u8] ⓘ
Returns value of the org_table field of a column packet as a byte slice.
“org_table” is for original table name.
Sourcepub fn org_table_str(&self) -> Cow<'_, str>
pub fn org_table_str(&self) -> Cow<'_, str>
Returns value of the org_table field of a column packet as a string (lossy converted).
Sourcepub fn name_ref(&self) -> &[u8] ⓘ
pub fn name_ref(&self) -> &[u8] ⓘ
Returns value of the name field of a column packet as a byte slice.
Sourcepub fn name_str(&self) -> Cow<'_, str>
pub fn name_str(&self) -> Cow<'_, str>
Returns value of the name field of a column packet as a string (lossy converted).
Sourcepub fn org_name_ref(&self) -> &[u8] ⓘ
pub fn org_name_ref(&self) -> &[u8] ⓘ
Returns value of the org_name field of a column packet as a byte slice.
“org_name” is for original column name.
Sourcepub fn org_name_str(&self) -> Cow<'_, str>
pub fn org_name_str(&self) -> Cow<'_, str>
Returns value of the org_name field of a column packet as a string (lossy converted).
Trait Implementations§
Source§impl<'de> MyDeserialize<'de> for Column
impl<'de> MyDeserialize<'de> for Column
Source§impl MySerialize for Column
impl MySerialize for Column
impl Eq for Column
impl StructuralPartialEq for Column
Auto Trait Implementations§
impl Freeze for Column
impl RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl UnwindSafe for Column
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.