pub unsafe trait SqlStr {
// Required methods
fn as_text_ptr(&self) -> *const SQLCHAR;
fn text_length(&self) -> SQLSMALLINT;
fn text_length_int(&self) -> SQLINTEGER;
}Expand description
A type implementing this trait can be passed as a string argument in API calls
Required Methods§
Sourcefn as_text_ptr(&self) -> *const SQLCHAR
fn as_text_ptr(&self) -> *const SQLCHAR
Returns a pointer to the start of the string
Sourcefn text_length(&self) -> SQLSMALLINT
fn text_length(&self) -> SQLSMALLINT
Returns buffer length or SQL_NTS
Sourcefn text_length_int(&self) -> SQLINTEGER
fn text_length_int(&self) -> SQLINTEGER
Returns buffer length or SQL_NTSL
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl SqlStr for CStr
impl SqlStr for CStr
fn as_text_ptr(&self) -> *const SQLCHAR
fn text_length(&self) -> SQLSMALLINT
fn text_length_int(&self) -> SQLINTEGER
Source§impl SqlStr for [u8]
For passing a buffer without terminating NULL
impl SqlStr for [u8]
For passing a buffer without terminating NULL
fn as_text_ptr(&self) -> *const SQLCHAR
fn text_length(&self) -> SQLSMALLINT
fn text_length_int(&self) -> SQLINTEGER
Source§impl SqlStr for str
For passing a buffer without terminating NULL
impl SqlStr for str
For passing a buffer without terminating NULL