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
impl RefUnwindSafe for OutputStringBuffer
impl Send for OutputStringBuffer
impl Sync for OutputStringBuffer
impl Unpin for OutputStringBuffer
impl UnwindSafe for OutputStringBuffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,