Struct odbc_api::handles::OutputStringBuffer[][src]

pub struct OutputStringBuffer { /* fields omitted */ }

We use this as an output buffer for strings. Allows for detecting truncation.

Implementations

impl OutputStringBuffer[src]

pub fn with_buffer_size(max_str_len: usize) -> Self[src]

Creates a new instance of an output string buffer which can hold strings up to a size of max_str_len characters.

pub fn mut_buf_ptr(&mut self) -> *mut u16[src]

Ptr to the internal buffer. Used by ODBC API calls to fill the buffer.

pub fn buf_len(&self) -> i16[src]

Length of the internal buffer in characters excluding the terminating zero.

pub fn mut_actual_len_ptr(&mut self) -> *mut i16[src]

Mutable pointer to actual output string length. Used by ODBC API calls to report truncation.

pub fn as_ucstr(&self) -> &U16CStr[src]

Interpret buffer as UTF16 string. Panics if no terminating zero present.

pub fn to_utf8(&self) -> String[src]

Call this method to extract string from buffer after ODBC has filled it.

pub fn is_truncated(&self) -> bool[src]

True if the buffer had not been large enough to hold the string.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.