Struct mysql_common::constants::CapabilityFlags
[−]
pub struct CapabilityFlags { /* fields omitted */ }
Client capability flags
Methods
impl CapabilityFlags
pub const CLIENT_LONG_PASSWORD: CapabilityFlags
CLIENT_LONG_PASSWORD: CapabilityFlags = CapabilityFlags{bits: 1,}
Use the improved version of Old Password Authentication. Assumed to be set since 4.1.1.
pub const CLIENT_FOUND_ROWS: CapabilityFlags
CLIENT_FOUND_ROWS: CapabilityFlags = CapabilityFlags{bits: 2,}
Send found rows instead of affected rows in EOF_Packet.
pub const CLIENT_LONG_FLAG: CapabilityFlags
CLIENT_LONG_FLAG: CapabilityFlags = CapabilityFlags{bits: 4,}
Get all column flags. Longer flags in Protocol::ColumnDefinition320.
Server
Supports longer flags.
Client
Expects longer flags.
pub const CLIENT_CONNECT_WITH_DB: CapabilityFlags
CLIENT_CONNECT_WITH_DB: CapabilityFlags = CapabilityFlags{bits: 8,}
Database (schema) name can be specified on connect in Handshake Response Packet.
Server
Supports schema-name in Handshake Response Packet.
Client
Handshake Response Packet contains a schema-name.
pub const CLIENT_NO_SCHEMA: CapabilityFlags
CLIENT_NO_SCHEMA: CapabilityFlags = CapabilityFlags{bits: 16,}
Don't allow database.table.column.
pub const CLIENT_COMPRESS: CapabilityFlags
CLIENT_COMPRESS: CapabilityFlags = CapabilityFlags{bits: 32,}
Compression protocol supported.
Server
Supports compression.
Client
Switches to Compression compressed protocol after successful authentication.
pub const CLIENT_ODBC: CapabilityFlags
CLIENT_ODBC: CapabilityFlags = CapabilityFlags{bits: 64,}
Special handling of ODBC behavior.
pub const CLIENT_LOCAL_FILES: CapabilityFlags
CLIENT_LOCAL_FILES: CapabilityFlags = CapabilityFlags{bits: 128,}
Can use LOAD DATA LOCAL.
Server
Enables the LOCAL INFILE request of LOAD DATA|XML.
Client
Will handle LOCAL INFILE request.
pub const CLIENT_IGNORE_SPACE: CapabilityFlags
CLIENT_IGNORE_SPACE: CapabilityFlags = CapabilityFlags{bits: 256,}
Ignore spaces before '('.
Server
Parser can ignore spaces before '('.
Client
Let the parser ignore spaces before '('.
pub const CLIENT_PROTOCOL_41: CapabilityFlags
CLIENT_PROTOCOL_41: CapabilityFlags = CapabilityFlags{bits: 512,}
pub const CLIENT_INTERACTIVE: CapabilityFlags
CLIENT_INTERACTIVE: CapabilityFlags = CapabilityFlags{bits: 1024,}
This is an interactive client. Use System_variables::net_wait_timeout versus System_variables::net_interactive_timeout.
Server
Supports interactive and noninteractive clients.
Client
Client is interactive.
pub const CLIENT_SSL: CapabilityFlags
CLIENT_SSL: CapabilityFlags = CapabilityFlags{bits: 2048,}
Use SSL encryption for the session.
Server
Supports SSL
Client
Switch to SSL after sending the capability-flags.
pub const CLIENT_IGNORE_SIGPIPE: CapabilityFlags
CLIENT_IGNORE_SIGPIPE: CapabilityFlags = CapabilityFlags{bits: 4096,}
Client only flag. Not used.
Client
Do not issue SIGPIPE if network failures occur (libmysqlclient only).
pub const CLIENT_TRANSACTIONS: CapabilityFlags
CLIENT_TRANSACTIONS: CapabilityFlags = CapabilityFlags{bits: 8192,}
Client knows about transactions.
Server
Can send status flags in OK_Packet / EOF_Packet.
Client
Expects status flags in OK_Packet / EOF_Packet.
Note
This flag is optional in 3.23, but always set by the server since 4.0.
pub const CLIENT_RESERVED: CapabilityFlags
CLIENT_RESERVED: CapabilityFlags = CapabilityFlags{bits: 16384,}
pub const CLIENT_SECURE_CONNECTION: CapabilityFlags
CLIENT_SECURE_CONNECTION: CapabilityFlags = CapabilityFlags{bits: 32768,}
pub const CLIENT_MULTI_STATEMENTS: CapabilityFlags
CLIENT_MULTI_STATEMENTS: CapabilityFlags = CapabilityFlags{bits: 65536,}
Enable/disable multi-stmt support. Also sets CLIENT_MULTI_RESULTS. Currently not checked anywhere.
Server
Can handle multiple statements per COM_QUERY and COM_STMT_PREPARE.
Client
May send multiple statements per COM_QUERY and COM_STMT_PREPARE.
pub const CLIENT_MULTI_RESULTS: CapabilityFlags
CLIENT_MULTI_RESULTS: CapabilityFlags = CapabilityFlags{bits: 131072,}
Enable/disable multi-results.
Server
Can send multiple resultsets for COM_QUERY. Error if the server needs to send them and client does not support them.
Client
Can handle multiple resultsets for COM_QUERY.
Requires
CLIENT_PROTOCOL_41
pub const CLIENT_PS_MULTI_RESULTS: CapabilityFlags
CLIENT_PS_MULTI_RESULTS: CapabilityFlags = CapabilityFlags{bits: 262144,}
Multi-results and OUT parameters in PS-protocol.
Server
Can send multiple resultsets for COM_STMT_EXECUTE.
Client
Can handle multiple resultsets for COM_STMT_EXECUTE.
Requires
CLIENT_PROTOCOL_41
pub const CLIENT_PLUGIN_AUTH: CapabilityFlags
CLIENT_PLUGIN_AUTH: CapabilityFlags = CapabilityFlags{bits: 524288,}
Client supports plugin authentication.
Server
Sends extra data in Initial Handshake Packet and supports the pluggable authentication protocol.
Client
Supports authentication plugins.
Requires
CLIENT_PROTOCOL_41
pub const CLIENT_CONNECT_ATTRS: CapabilityFlags
CLIENT_CONNECT_ATTRS: CapabilityFlags = CapabilityFlags{bits: 1048576,}
Client supports connection attributes.
Server
Permits connection attributes in Protocol::HandshakeResponse41.
Client
Sends connection attributes in Protocol::HandshakeResponse41.
pub const CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA: CapabilityFlags
CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA: CapabilityFlags = CapabilityFlags{bits: 2097152,}
Enable authentication response packet to be larger than 255 bytes. When the ability to change default plugin require that the initial password field in the Protocol::HandshakeResponse41 paclet can be of arbitrary size. However, the 4.1 client-server protocol limits the length of the auth-data-field sent from client to server to 255 bytes. The solution is to change the type of the field to a true length encoded string and indicate the protocol change with this client capability flag.
Server
Understands length-encoded integer for auth response data in Protocol::HandshakeResponse41.
Client
Length of auth response data in Protocol::HandshakeResponse41 is a length-encoded integer.
Note
The flag was introduced in 5.6.6, but had the wrong value.
pub const CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS: CapabilityFlags
CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS: CapabilityFlags = CapabilityFlags{bits: 4194304,}
Don't close the connection for a user account with expired password.
Server
Announces support for expired password extension.
Client
Can handle expired passwords.
pub const CLIENT_SESSION_TRACK: CapabilityFlags
CLIENT_SESSION_TRACK: CapabilityFlags = CapabilityFlags{bits: 8388608,}
Capable of handling server state change information. Its a hint to the server to include the state change information in OK_Packet.
Server
Can set SERVER_SESSION_STATE_CHANGED in the SERVER_STATUS_flags_enum and send Session State Information in a OK_Packet.
Client
Expects the server to send Session State Information in a OK_Packet.
pub const CLIENT_DEPRECATE_EOF: CapabilityFlags
CLIENT_DEPRECATE_EOF: CapabilityFlags = CapabilityFlags{bits: 16777216,}
Client no longer needs EOF_Packet and will use OK_Packet instead.
Server
Can send OK after a Text Resultset.
Client
Expects an OK_Packet (instead of EOF_Packet) after the resultset rows of a Text Resultset.
Background
To support CLIENT_SESSION_TRACK, additional information must be sent after all successful commands. Although the OK_Packet is extensible, the EOF_Packet is not due to the overlap of its bytes with the content of the Text Resultset Row.
Therefore, the EOF_Packet in the Text Resultset is replaced with an OK_Packet. EOF_Packet is deprecated as of MySQL 5.7.5.
pub const CLIENT_PROGRESS_OBSOLETE: CapabilityFlags
CLIENT_PROGRESS_OBSOLETE: CapabilityFlags = CapabilityFlags{bits: 536870912,}
Client or server supports progress reports within error packet.
pub const CLIENT_SSL_VERIFY_SERVER_CERT: CapabilityFlags
CLIENT_SSL_VERIFY_SERVER_CERT: CapabilityFlags = CapabilityFlags{bits: 1073741824,}
Verify server certificate. Client only flag.
Deprecated in favor of –ssl-mode.
pub const CLIENT_REMEMBER_OPTIONS: CapabilityFlags
CLIENT_REMEMBER_OPTIONS: CapabilityFlags = CapabilityFlags{bits: 2147483648,}
Don't reset the options after an unsuccessful connect. Client only flag.
pub fn empty() -> CapabilityFlags
Returns an empty set of flags.
pub fn all() -> CapabilityFlags
Returns the set containing all flags.
pub fn bits(&self) -> u32
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u32) -> Option<CapabilityFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: u32) -> CapabilityFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: CapabilityFlags) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: CapabilityFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: CapabilityFlags)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: CapabilityFlags)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: CapabilityFlags)
Toggles the specified flags in-place.
pub fn set(&mut self, other: CapabilityFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Copy for CapabilityFlags
impl PartialEq for CapabilityFlags
fn eq(&self, __arg_0: &CapabilityFlags) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &CapabilityFlags) -> bool
This method tests for !=
.
impl Eq for CapabilityFlags
impl Clone for CapabilityFlags
fn clone(&self) -> CapabilityFlags
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialOrd for CapabilityFlags
fn partial_cmp(&self, __arg_0: &CapabilityFlags) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &CapabilityFlags) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &CapabilityFlags) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &CapabilityFlags) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &CapabilityFlags) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for CapabilityFlags
fn cmp(&self, __arg_0: &CapabilityFlags) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl Hash for CapabilityFlags
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for CapabilityFlags
impl Binary for CapabilityFlags
impl Octal for CapabilityFlags
impl LowerHex for CapabilityFlags
impl UpperHex for CapabilityFlags
impl BitOr for CapabilityFlags
type Output = CapabilityFlags
The resulting type after applying the |
operator.
fn bitor(self, other: CapabilityFlags) -> CapabilityFlags
Returns the union of the two sets of flags.
impl BitOrAssign for CapabilityFlags
fn bitor_assign(&mut self, other: CapabilityFlags)
Adds the set of flags.
impl BitXor for CapabilityFlags
type Output = CapabilityFlags
The resulting type after applying the ^
operator.
fn bitxor(self, other: CapabilityFlags) -> CapabilityFlags
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for CapabilityFlags
fn bitxor_assign(&mut self, other: CapabilityFlags)
Toggles the set of flags.
impl BitAnd for CapabilityFlags
type Output = CapabilityFlags
The resulting type after applying the &
operator.
fn bitand(self, other: CapabilityFlags) -> CapabilityFlags
Returns the intersection between the two sets of flags.
impl BitAndAssign for CapabilityFlags
fn bitand_assign(&mut self, other: CapabilityFlags)
Disables all flags disabled in the set.
impl Sub for CapabilityFlags
type Output = CapabilityFlags
The resulting type after applying the -
operator.
fn sub(self, other: CapabilityFlags) -> CapabilityFlags
Returns the set difference of the two sets of flags.
impl SubAssign for CapabilityFlags
fn sub_assign(&mut self, other: CapabilityFlags)
Disables all flags enabled in the set.
impl Not for CapabilityFlags
type Output = CapabilityFlags
The resulting type after applying the !
operator.
fn not(self) -> CapabilityFlags
Returns the complement of this set of flags.
impl Extend<CapabilityFlags> for CapabilityFlags
fn extend<T: IntoIterator<Item = CapabilityFlags>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
impl FromIterator<CapabilityFlags> for CapabilityFlags
fn from_iter<T: IntoIterator<Item = CapabilityFlags>>(
iterator: T
) -> CapabilityFlags
iterator: T
) -> CapabilityFlags
Creates a value from an iterator. Read more