pub trait Allocate<'src, SRC: AsSQLHANDLE>: Handle {
// Required method
unsafe fn from_raw(output_handle: NonNull<RawHandle>) -> Self;
// Provided methods
fn SQLAllocHandle(InputHandle: &'src SRC) -> (Result<Self, ()>, SQLRETURN) { ... }
fn SQLFreeHandle(self) { ... }
}Required Methods§
Provided Methods§
Sourcefn SQLAllocHandle(InputHandle: &'src SRC) -> (Result<Self, ()>, SQLRETURN)
fn SQLAllocHandle(InputHandle: &'src SRC) -> (Result<Self, ()>, SQLRETURN)
Allocates an environment, connection, statement, or descriptor handle.
For complete documentation on SQLAllocHandle, see API reference.
§Returns
SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_INVALID_HANDLE, or SQL_ERROR.
Sourcefn SQLFreeHandle(self)
fn SQLFreeHandle(self)
Frees resources associated with a specific environment, connection, statement, or descriptor handle.
For complete documentation on SQLFreeHandle, see API reference.
§Panics
Panics if the DM returns value other than SQL_SUCCESS
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.