pub struct Database(/* private fields */);
Implementations§
Source§impl Database
impl Database
pub fn new() -> Result<Self, Box<dyn Error>>
pub fn new_with_config(config: &Config) -> Result<Self, Box<dyn Error>>
pub fn from_cpp_duckdb(ptr: *mut c_void) -> Self
pub fn connect(&self) -> Result<Connection, Box<dyn Error>>
Sourcepub unsafe fn add_replacement_scan(
&self,
replacement: duckdb_replacement_callback_t,
extra_data: *mut c_void,
delete_callback: duckdb_delete_callback_t,
)
pub unsafe fn add_replacement_scan( &self, replacement: duckdb_replacement_callback_t, extra_data: *mut c_void, delete_callback: duckdb_delete_callback_t, )
Add a replacement scan definition to the specified database
§Safety
The extra_data
arg should live as long as the database
§Arguments
replacement
: The replacement scan callbackextra_data
: Extra data that is passed back into the specified callbackdelete_callback
: The delete callback to call on the extra data, if any
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Database
impl RefUnwindSafe for Database
impl !Send for Database
impl !Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more