odbc_api::handles

Struct Record

Source
pub struct Record {
    pub state: State,
    pub native_error: i32,
    pub message: Vec<SqlChar>,
}
Expand description

ODBC Diagnostic Record

The description method of the std::error::Error trait only returns the message. Use std::fmt::Display to retrieve status code and other information.

Fields§

§state: State

All elements but the last one, may not be null. The last one must be null.

§native_error: i32

Error code returned by Driver manager or driver

§message: Vec<SqlChar>

Buffer containing the error message. The buffer already has the correct size, and there is no terminating zero at the end.

Implementations§

Source§

impl Record

Source

pub fn with_capacity(capacity: usize) -> Self

Creates an empty diagnostic record with at least the specified capacity for the message. Using a buffer with a size different from zero then filling the diagnostic record may safe a second function call to SQLGetDiagRec.

Source

pub fn fill_from( &mut self, handle: &(impl Diagnostics + ?Sized), record_number: i16, ) -> bool

Fill this diagnostic Record from any ODBC handle.

§Return

true if a record has been found, false if not.

Trait Implementations§

Source§

impl Debug for Record

Source§

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

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

impl Default for Record

Source§

fn default() -> Record

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

impl Display for Record

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Record

§

impl RefUnwindSafe for Record

§

impl Send for Record

§

impl Sync for Record

§

impl Unpin for Record

§

impl UnwindSafe for Record

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

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

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

Source§

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.