Struct mysql_common::constants::StatusFlags
source · pub struct StatusFlags { /* private fields */ }
Expand description
MySql server status flags
Implementations
sourceimpl StatusFlags
impl StatusFlags
sourcepub const SERVER_STATUS_IN_TRANS: Self = _
pub const SERVER_STATUS_IN_TRANS: Self = _
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.
sourcepub const SERVER_STATUS_AUTOCOMMIT: Self = _
pub const SERVER_STATUS_AUTOCOMMIT: Self = _
Server in auto_commit mode.
sourcepub const SERVER_MORE_RESULTS_EXISTS: Self = _
pub const SERVER_MORE_RESULTS_EXISTS: Self = _
Multi query - next query exists.
pub const SERVER_STATUS_NO_GOOD_INDEX_USED: Self = _
pub const SERVER_STATUS_NO_INDEX_USED: Self = _
sourcepub const SERVER_STATUS_CURSOR_EXISTS: Self = _
pub const SERVER_STATUS_CURSOR_EXISTS: Self = _
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.
sourcepub const SERVER_STATUS_LAST_ROW_SENT: Self = _
pub const SERVER_STATUS_LAST_ROW_SENT: Self = _
This flag is sent when a read-only cursor is exhausted, in reply to COM_STMT_FETCH command.
sourcepub const SERVER_STATUS_DB_DROPPED: Self = _
pub const SERVER_STATUS_DB_DROPPED: Self = _
A database was dropped.
pub const SERVER_STATUS_NO_BACKSLASH_ESCAPES: Self = _
sourcepub const SERVER_STATUS_METADATA_CHANGED: Self = _
pub const SERVER_STATUS_METADATA_CHANGED: Self = _
Sent to the client if after a prepared statement reprepare we discovered that the new statement returns a different number of result set columns.
pub const SERVER_QUERY_WAS_SLOW: Self = _
sourcepub const SERVER_PS_OUT_PARAMS: Self = _
pub const SERVER_PS_OUT_PARAMS: Self = _
To mark ResultSet containing output parameter values.
sourcepub const SERVER_STATUS_IN_TRANS_READONLY: Self = _
pub const SERVER_STATUS_IN_TRANS_READONLY: Self = _
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.
sourcepub const SERVER_SESSION_STATE_CHANGED: Self = _
pub const SERVER_SESSION_STATE_CHANGED: Self = _
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.
sourcepub const fn from_bits(bits: u16) -> Option<Self>
pub const fn from_bits(bits: u16) -> Option<Self>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: u16) -> Self
pub const fn from_bits_truncate(bits: u16) -> Self
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u16) -> Self
pub const unsafe fn from_bits_unchecked(bits: u16) -> Self
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Safety
The caller of the bitflags!
macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked()
has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Returns true
if there are flags common to both self
and other
.
sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Returns true
if all of the flags in other
are contained within self
.
sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Inserts or removes the specified flags depending on the passed value.
sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
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
.
sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
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
.
sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
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
.
sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
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
.
sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
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
.
Trait Implementations
sourceimpl Binary for StatusFlags
impl Binary for StatusFlags
sourceimpl BitAnd<StatusFlags> for StatusFlags
impl BitAnd<StatusFlags> for StatusFlags
type Output = StatusFlags
type Output = StatusFlags
&
operator.sourceimpl BitAndAssign<StatusFlags> for StatusFlags
impl BitAndAssign<StatusFlags> for StatusFlags
sourcefn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Disables all flags disabled in the set.
sourceimpl BitOr<StatusFlags> for StatusFlags
impl BitOr<StatusFlags> for StatusFlags
sourcefn bitor(self, other: StatusFlags) -> Self
fn bitor(self, other: StatusFlags) -> Self
Returns the union of the two sets of flags.
type Output = StatusFlags
type Output = StatusFlags
|
operator.sourceimpl BitOrAssign<StatusFlags> for StatusFlags
impl BitOrAssign<StatusFlags> for StatusFlags
sourcefn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Adds the set of flags.
sourceimpl BitXor<StatusFlags> for StatusFlags
impl BitXor<StatusFlags> for StatusFlags
sourcefn bitxor(self, other: Self) -> Self
fn bitxor(self, other: Self) -> Self
Returns the left flags, but with all the right flags toggled.
type Output = StatusFlags
type Output = StatusFlags
^
operator.sourceimpl BitXorAssign<StatusFlags> for StatusFlags
impl BitXorAssign<StatusFlags> for StatusFlags
sourcefn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
Toggles the set of flags.
sourceimpl Clone for StatusFlags
impl Clone for StatusFlags
sourcefn clone(&self) -> StatusFlags
fn clone(&self) -> StatusFlags
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for StatusFlags
impl Debug for StatusFlags
sourceimpl Extend<StatusFlags> for StatusFlags
impl Extend<StatusFlags> for StatusFlags
sourcefn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)sourceimpl FromIterator<StatusFlags> for StatusFlags
impl FromIterator<StatusFlags> for StatusFlags
sourcefn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
sourceimpl Hash for StatusFlags
impl Hash for StatusFlags
sourceimpl LowerHex for StatusFlags
impl LowerHex for StatusFlags
sourceimpl Not for StatusFlags
impl Not for StatusFlags
type Output = StatusFlags
type Output = StatusFlags
!
operator.sourceimpl Octal for StatusFlags
impl Octal for StatusFlags
sourceimpl Ord for StatusFlags
impl Ord for StatusFlags
sourcefn cmp(&self, other: &StatusFlags) -> Ordering
fn cmp(&self, other: &StatusFlags) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl PartialEq<StatusFlags> for StatusFlags
impl PartialEq<StatusFlags> for StatusFlags
sourcefn eq(&self, other: &StatusFlags) -> bool
fn eq(&self, other: &StatusFlags) -> bool
sourceimpl PartialOrd<StatusFlags> for StatusFlags
impl PartialOrd<StatusFlags> for StatusFlags
sourcefn partial_cmp(&self, other: &StatusFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &StatusFlags) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl Sub<StatusFlags> for StatusFlags
impl Sub<StatusFlags> for StatusFlags
type Output = StatusFlags
type Output = StatusFlags
-
operator.sourceimpl SubAssign<StatusFlags> for StatusFlags
impl SubAssign<StatusFlags> for StatusFlags
sourcefn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Disables all flags enabled in the set.