Struct msql_srv::StatusFlags

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

MySql server status flags

Implementations§

source§

impl StatusFlags

source

pub const SERVER_STATUS_IN_TRANS: StatusFlags = _

Is raised when a multi-statement transaction has been started, either explicitly, by means of BEGIN or COMMIT AND CHAIN, or implicitly, by the first transactional statement, when autocommit=off.

source

pub const SERVER_STATUS_AUTOCOMMIT: StatusFlags = _

Server in auto_commit mode.

source

pub const SERVER_MORE_RESULTS_EXISTS: StatusFlags = _

Multi query - next query exists.

source

pub const SERVER_STATUS_NO_GOOD_INDEX_USED: StatusFlags = _

source

pub const SERVER_STATUS_NO_INDEX_USED: StatusFlags = _

source

pub const SERVER_STATUS_CURSOR_EXISTS: StatusFlags = _

The server was able to fulfill the clients request and opened a read-only non-scrollable cursor for a query. This flag comes in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands. Used by Binary Protocol Resultset to signal that COM_STMT_FETCH must be used to fetch the row-data.

source

pub const SERVER_STATUS_LAST_ROW_SENT: StatusFlags = _

This flag is sent when a read-only cursor is exhausted, in reply to COM_STMT_FETCH command.

source

pub const SERVER_STATUS_DB_DROPPED: StatusFlags = _

A database was dropped.

source

pub const SERVER_STATUS_NO_BACKSLASH_ESCAPES: StatusFlags = _

source

pub const SERVER_STATUS_METADATA_CHANGED: StatusFlags = _

Sent to the client if after a prepared statement reprepare we discovered that the new statement returns a different number of result set columns.

source

pub const SERVER_QUERY_WAS_SLOW: StatusFlags = _

source

pub const SERVER_PS_OUT_PARAMS: StatusFlags = _

To mark ResultSet containing output parameter values.

source

pub const SERVER_STATUS_IN_TRANS_READONLY: StatusFlags = _

Set at the same time as SERVER_STATUS_IN_TRANS if the started multi-statement transaction is a read-only transaction. Cleared when the transaction commits or aborts. Since this flag is sent to clients in OK and EOF packets, the flag indicates the transaction status at the end of command execution.

source

pub const SERVER_SESSION_STATE_CHANGED: StatusFlags = _

This status flag, when on, implies that one of the state information has changed on the server because of the execution of the last statement.

source§

impl StatusFlags

source

pub const fn empty() -> StatusFlags

Returns an empty set of flags.

source

pub const fn all() -> StatusFlags

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

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) -> StatusFlags

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

source

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

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

source

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

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: StatusFlags) -> bool

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

source

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

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

source

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

Inserts the specified flags in-place.

source

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

Removes the specified flags in-place.

source

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

Toggles the specified flags in-place.

source

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

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

source

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

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: StatusFlags) -> StatusFlags

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: StatusFlags) -> StatusFlags

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: StatusFlags) -> StatusFlags

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) -> StatusFlags

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 StatusFlags

source

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

Iterate over enabled flag values.

source

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

Iterate over enabled flag values with their stringified names.

Trait Implementations§

source§

impl Binary for StatusFlags

source§

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

Formats the value using the given formatter.
source§

impl BitAnd for StatusFlags

source§

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

Returns the intersection between the two sets of flags.

§

type Output = StatusFlags

The resulting type after applying the & operator.
source§

impl BitAndAssign for StatusFlags

source§

fn bitand_assign(&mut self, other: StatusFlags)

Disables all flags disabled in the set.

source§

impl BitOr for StatusFlags

source§

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

Returns the union of the two sets of flags.

§

type Output = StatusFlags

The resulting type after applying the | operator.
source§

impl BitOrAssign for StatusFlags

source§

fn bitor_assign(&mut self, other: StatusFlags)

Adds the set of flags.

source§

impl BitXor for StatusFlags

source§

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

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

§

type Output = StatusFlags

The resulting type after applying the ^ operator.
source§

impl BitXorAssign for StatusFlags

source§

fn bitxor_assign(&mut self, other: StatusFlags)

Toggles the set of flags.

source§

impl Clone for StatusFlags

source§

fn clone(&self) -> StatusFlags

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 StatusFlags

source§

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

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

impl Default for StatusFlags

source§

fn default() -> StatusFlags

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

impl Extend<StatusFlags> for StatusFlags

source§

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

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 StatusFlags

source§

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

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) -> StatusFlags

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<StatusFlags> for StatusFlags

source§

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

Creates a value from an iterator. Read more
source§

impl Hash for StatusFlags

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 StatusFlags

§

type Item = StatusFlags

The type of the elements being iterated over.
§

type IntoIter = Iter<StatusFlags>

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

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

Creates an iterator from a value. Read more
source§

impl LowerHex for StatusFlags

source§

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

Formats the value using the given formatter.
source§

impl Not for StatusFlags

source§

fn not(self) -> StatusFlags

Returns the complement of this set of flags.

§

type Output = StatusFlags

The resulting type after applying the ! operator.
source§

impl Octal for StatusFlags

source§

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

Formats the value using the given formatter.
source§

impl PartialEq for StatusFlags

source§

fn eq(&self, other: &StatusFlags) -> 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 StatusFlags

source§

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

Returns the set difference of the two sets of flags.

§

type Output = StatusFlags

The resulting type after applying the - operator.
source§

impl SubAssign for StatusFlags

source§

fn sub_assign(&mut self, other: StatusFlags)

Disables all flags enabled in the set.

source§

impl TryFrom<u16> for StatusFlags

§

type Error = UnknownStatusFlags

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

fn try_from(val: u16) -> Result<StatusFlags, UnknownStatusFlags>

Performs the conversion.
source§

impl UpperHex for StatusFlags

source§

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

Formats the value using the given formatter.
source§

impl Copy for StatusFlags

source§

impl Eq for StatusFlags

source§

impl StructuralEq for StatusFlags

source§

impl StructuralPartialEq for StatusFlags

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