Struct odbc_api::handles::OutputStringBuffer [−][src]
pub struct OutputStringBuffer { /* fields omitted */ }
Expand description
We use this as an output buffer for strings. Allows for detecting truncation.
Implementations
impl OutputStringBuffer
[src]
impl OutputStringBuffer
[src]pub fn with_buffer_size(max_str_len: usize) -> Self
[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]
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]
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]
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]
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]
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]
pub fn is_truncated(&self) -> bool
[src]True if the buffer had not been large enough to hold the string.