Capabilities

Struct Capabilities 

Source
pub struct Capabilities {
Show 15 fields pub protocol_version: u16, pub protocol_options: u16, pub charset_id: u16, pub ncharset_id: u16, pub compile_caps: Vec<u8>, pub runtime_caps: Vec<u8>, pub ttc_field_version: u8, pub sdu: u32, pub max_string_size: u32, pub supports_fast_auth: bool, pub supports_oob: bool, pub supports_end_of_response: bool, pub supports_pipelining: bool, pub supports_request_boundaries: bool, pub combo_key: Option<Vec<u8>>,
}
Expand description

Capabilities negotiated between client and server

Fields§

§protocol_version: u16

Negotiated protocol version

§protocol_options: u16

Protocol options from server

§charset_id: u16

Character set ID for database communication

§ncharset_id: u16

National character set ID

§compile_caps: Vec<u8>

Compile-time capabilities array (CCAP)

§runtime_caps: Vec<u8>

Runtime capabilities array (RCAP)

§ttc_field_version: u8

TTC field version

§sdu: u32

Negotiated SDU size

§max_string_size: u32

Maximum string size (4000 or 32767)

§supports_fast_auth: bool

Whether fast authentication is supported

§supports_oob: bool

Whether OOB (out of band) is supported

§supports_end_of_response: bool

Whether end-of-response markers are supported

§supports_pipelining: bool

Whether pipelining is supported

§supports_request_boundaries: bool

Whether request boundaries are supported

§combo_key: Option<Vec<u8>>

Combo key derived during authentication (for encryption)

Implementations§

Source§

impl Capabilities

Source

pub fn new() -> Self

Create new capabilities with default client values

Source

pub fn adjust_for_protocol( &mut self, protocol_version: u16, protocol_options: u16, flags2: u32, )

Adjust capabilities based on ACCEPT packet response

Source

pub fn adjust_for_server_compile_caps(&mut self, server_caps: &[u8])

Adjust capabilities based on server’s compile-time capabilities

Source

pub fn adjust_for_server_runtime_caps(&mut self, server_caps: &[u8])

Adjust capabilities based on server’s runtime capabilities

Source

pub fn check_ncharset_id(&self) -> Result<()>

Check if the national character set is supported

Source

pub fn supports_bool(&self) -> bool

Check if we support boolean type (Oracle 23.1+)

Source

pub fn supports_large_oson_fname(&self) -> bool

Check if we support large OSON field names (Oracle 23.1+)

Trait Implementations§

Source§

impl Clone for Capabilities

Source§

fn clone(&self) -> Capabilities

Returns a duplicate of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Capabilities

Source§

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

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

impl Default for Capabilities

Source§

fn default() -> Self

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

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

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

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
§

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

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

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

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

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

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

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

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more