Struct msql_srv::ColumnFlags

source ·
pub struct ColumnFlags(/* private fields */);
Expand description

MySql column flags

Implementations§

source§

impl ColumnFlags

source

pub const NOT_NULL_FLAG: ColumnFlags = _

Field can’t be NULL.

source

pub const PRI_KEY_FLAG: ColumnFlags = _

Field is part of a primary key.

source

pub const UNIQUE_KEY_FLAG: ColumnFlags = _

Field is part of a unique key.

source

pub const MULTIPLE_KEY_FLAG: ColumnFlags = _

Field is part of a key.

source

pub const BLOB_FLAG: ColumnFlags = _

Field is a blob.

source

pub const UNSIGNED_FLAG: ColumnFlags = _

Field is unsigned.

source

pub const ZEROFILL_FLAG: ColumnFlags = _

Field is zerofill.

source

pub const BINARY_FLAG: ColumnFlags = _

Field is binary.

source

pub const ENUM_FLAG: ColumnFlags = _

Field is an enum.

source

pub const AUTO_INCREMENT_FLAG: ColumnFlags = _

Field is a autoincrement field.

source

pub const TIMESTAMP_FLAG: ColumnFlags = _

Field is a timestamp.

source

pub const SET_FLAG: ColumnFlags = _

Field is a set.

source

pub const NO_DEFAULT_VALUE_FLAG: ColumnFlags = _

Field doesn’t have default value.

source

pub const ON_UPDATE_NOW_FLAG: ColumnFlags = _

Field is set to NOW on UPDATE.

source

pub const PART_KEY_FLAG: ColumnFlags = _

Intern; Part of some key.

source

pub const NUM_FLAG: ColumnFlags = _

Field is num (for clients).

source§

impl ColumnFlags

source

pub const fn empty() -> ColumnFlags

Returns an empty set of flags.

source

pub const fn all() -> ColumnFlags

Returns the set containing all flags.

source

pub const fn bits(&self) -> u16

Returns the raw value of the flags currently stored.

source

pub const fn from_bits(bits: u16) -> Option<ColumnFlags>

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

source

pub const fn from_bits_truncate(bits: u16) -> ColumnFlags

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

source

pub const fn from_bits_retain(bits: u16) -> ColumnFlags

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

source

pub fn from_name(name: &str) -> Option<ColumnFlags>

Get the value for a flag from its stringified name.

Names are case-sensitive, so must correspond exactly to the identifier given to the flag.

source

pub const fn is_empty(&self) -> bool

Returns true if no flags are currently stored.

source

pub const fn is_all(&self) -> bool

Returns true if all flags are currently set.

source

pub const fn intersects(&self, other: ColumnFlags) -> bool

Returns true if there are flags common to both self and other.

source

pub const fn contains(&self, other: ColumnFlags) -> bool

Returns true if all of the flags in other are contained within self.

source

pub fn insert(&mut self, other: ColumnFlags)

Inserts the specified flags in-place.

source

pub fn remove(&mut self, other: ColumnFlags)

Removes the specified flags in-place.

source

pub fn toggle(&mut self, other: ColumnFlags)

Toggles the specified flags in-place.

source

pub fn set(&mut self, other: ColumnFlags, value: bool)

Inserts or removes the specified flags depending on the passed value.

source

pub const fn intersection(self, other: ColumnFlags) -> ColumnFlags

Returns the intersection between the flags in self and other.

Specifically, the returned set contains only the flags which are present in both self and other.

This is equivalent to using the & operator (e.g. ops::BitAnd), as in flags & other.

source

pub const fn union(self, other: ColumnFlags) -> ColumnFlags

Returns the union of between the flags in self and other.

Specifically, the returned set contains all flags which are present in either self or other, including any which are present in both (see Self::symmetric_difference if that is undesirable).

This is equivalent to using the | operator (e.g. ops::BitOr), as in flags | other.

source

pub const fn difference(self, other: ColumnFlags) -> ColumnFlags

Returns the difference between the flags in self and other.

Specifically, the returned set contains all flags present in self, except for the ones present in other.

It is also conceptually equivalent to the “bit-clear” operation: flags & !other (and this syntax is also supported).

This is equivalent to using the - operator (e.g. ops::Sub), as in flags - other.

source

pub const fn symmetric_difference(self, other: ColumnFlags) -> ColumnFlags

Returns the symmetric difference between the flags in self and other.

Specifically, the returned set contains the flags present which are present in self or other, but that are not present in both. Equivalently, it contains the flags present in exactly one of the sets self and other.

This is equivalent to using the ^ operator (e.g. ops::BitXor), as in flags ^ other.

source

pub const fn complement(self) -> ColumnFlags

Returns the complement of this set of flags.

Specifically, the returned set contains all the flags which are not set in self, but which are allowed for this type.

Alternatively, it can be thought of as the set difference between Self::all() and self (e.g. Self::all() - self)

This is equivalent to using the ! operator (e.g. ops::Not), as in !flags.

source§

impl ColumnFlags

source

pub const fn iter(&self) -> Iter<ColumnFlags>

Iterate over enabled flag values.

source

pub const fn iter_names(&self) -> IterNames<ColumnFlags>

Iterate over enabled flag values with their stringified names.

Trait Implementations§

source§

impl Binary for ColumnFlags

source§

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

Formats the value using the given formatter.
source§

impl BitAnd for ColumnFlags

source§

fn bitand(self, other: ColumnFlags) -> ColumnFlags

Returns the intersection between the two sets of flags.

§

type Output = ColumnFlags

The resulting type after applying the & operator.
source§

impl BitAndAssign for ColumnFlags

source§

fn bitand_assign(&mut self, other: ColumnFlags)

Disables all flags disabled in the set.

source§

impl BitOr for ColumnFlags

source§

fn bitor(self, other: ColumnFlags) -> ColumnFlags

Returns the union of the two sets of flags.

§

type Output = ColumnFlags

The resulting type after applying the | operator.
source§

impl BitOrAssign for ColumnFlags

source§

fn bitor_assign(&mut self, other: ColumnFlags)

Adds the set of flags.

source§

impl BitXor for ColumnFlags

source§

fn bitxor(self, other: ColumnFlags) -> ColumnFlags

Returns the left flags, but with all the right flags toggled.

§

type Output = ColumnFlags

The resulting type after applying the ^ operator.
source§

impl BitXorAssign for ColumnFlags

source§

fn bitxor_assign(&mut self, other: ColumnFlags)

Toggles the set of flags.

source§

impl Clone for ColumnFlags

source§

fn clone(&self) -> ColumnFlags

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ColumnFlags

source§

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

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

impl Default for ColumnFlags

source§

fn default() -> ColumnFlags

Returns the “default value” for a type. Read more
source§

impl Extend<ColumnFlags> for ColumnFlags

source§

fn extend<T>(&mut self, iterator: T)
where T: IntoIterator<Item = ColumnFlags>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl Flags for ColumnFlags

source§

const FLAGS: &'static [Flag<ColumnFlags>] = _

The set of available flags and their names.
§

type Bits = u16

The underlying storage type.
source§

fn bits(&self) -> u16

Returns the raw value of the flags currently stored.
source§

fn from_bits_retain(bits: u16) -> ColumnFlags

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
source§

fn empty() -> Self

Returns an empty set of flags.
source§

fn all() -> Self

Returns the set containing all flags.
source§

fn from_bits(bits: Self::Bits) -> Option<Self>

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag. Read more
source§

fn from_bits_truncate(bits: Self::Bits) -> Self

Convert from underlying bit representation, dropping any bits that do not correspond to flags. Read more
source§

fn from_name(name: &str) -> Option<Self>

Get the flag for a particular name.
source§

fn iter(&self) -> Iter<Self>

Iterate over enabled flag values.
source§

fn iter_names(&self) -> IterNames<Self>

Iterate over the raw names and bits for enabled flag values.
source§

fn is_empty(&self) -> bool

Returns true if no flags are currently stored.
source§

fn is_all(&self) -> bool

Returns true if all flags are currently set.
source§

fn intersects(&self, other: Self) -> bool
where Self: Sized,

Returns true if there are flags common to both self and other.
source§

fn contains(&self, other: Self) -> bool
where Self: Sized,

Returns true if all of the flags in other are contained within self.
source§

fn insert(&mut self, other: Self)
where Self: Sized,

Inserts the specified flags in-place.
source§

fn remove(&mut self, other: Self)
where Self: Sized,

Removes the specified flags in-place.
source§

fn toggle(&mut self, other: Self)
where Self: Sized,

Toggles the specified flags in-place.
source§

fn set(&mut self, other: Self, value: bool)
where Self: Sized,

Inserts or removes the specified flags depending on the passed value.
source§

fn intersection(self, other: Self) -> Self

Returns the intersection between the flags in self and other. Read more
source§

fn union(self, other: Self) -> Self

Returns the union of between the flags in self and other. Read more
source§

fn difference(self, other: Self) -> Self

Returns the difference between the flags in self and other. Read more
source§

fn symmetric_difference(self, other: Self) -> Self

Returns the symmetric difference between the flags in self and other. Read more
source§

fn complement(self) -> Self

Returns the complement of this set of flags. Read more
source§

impl FromIterator<ColumnFlags> for ColumnFlags

source§

fn from_iter<T>(iterator: T) -> ColumnFlags
where T: IntoIterator<Item = ColumnFlags>,

Creates a value from an iterator. Read more
source§

impl Hash for ColumnFlags

source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl IntoIterator for ColumnFlags

§

type Item = ColumnFlags

The type of the elements being iterated over.
§

type IntoIter = Iter<ColumnFlags>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> <ColumnFlags as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
source§

impl LowerHex for ColumnFlags

source§

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

Formats the value using the given formatter.
source§

impl Not for ColumnFlags

source§

fn not(self) -> ColumnFlags

Returns the complement of this set of flags.

§

type Output = ColumnFlags

The resulting type after applying the ! operator.
source§

impl Octal for ColumnFlags

source§

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

Formats the value using the given formatter.
source§

impl PartialEq for ColumnFlags

source§

fn eq(&self, other: &ColumnFlags) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Sub for ColumnFlags

source§

fn sub(self, other: ColumnFlags) -> ColumnFlags

Returns the set difference of the two sets of flags.

§

type Output = ColumnFlags

The resulting type after applying the - operator.
source§

impl SubAssign for ColumnFlags

source§

fn sub_assign(&mut self, other: ColumnFlags)

Disables all flags enabled in the set.

source§

impl TryFrom<u16> for ColumnFlags

§

type Error = UnknownColumnFlags

The type returned in the event of a conversion error.
source§

fn try_from(val: u16) -> Result<ColumnFlags, UnknownColumnFlags>

Performs the conversion.
source§

impl UpperHex for ColumnFlags

source§

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

Formats the value using the given formatter.
source§

impl Copy for ColumnFlags

source§

impl Eq for ColumnFlags

source§

impl StructuralEq for ColumnFlags

source§

impl StructuralPartialEq for ColumnFlags

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<B> BitFlags for B
where B: Flags,

§

type Iter = Iter<B>

👎Deprecated: use the Flags trait instead
An iterator over enabled flags in an instance of the type.
§

type IterNames = IterNames<B>

👎Deprecated: use the Flags trait instead
An iterator over the raw names and bits for enabled flags in an instance of the type.
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
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices

§

type Remainder = Choices

§

fn subset( self ) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>

Extract a subset of the possible types in a coproduct (or get the remaining possibilities) Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. 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.

§

impl<T, U, I> LiftInto<U, I> for T
where U: LiftFrom<T, I>,

§

fn lift_into(self) -> U

Performs the indexed conversion.
§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<Source> Sculptor<HNil, HNil> for Source

§

type Remainder = Source

§

fn sculpt(self) -> (HNil, <Source as Sculptor<HNil, HNil>>::Remainder)

Consumes the current HList and returns an HList with the requested shape. Read more
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V