pub struct FileOpenOptions { /* private fields */ }Expand description
RAII wrapper for duckdb_file_open_options.
Describes how a file should be opened. Automatically destroyed when dropped.
Implementations§
Source§impl FileOpenOptions
impl FileOpenOptions
Sourcepub fn write_create() -> Self
pub fn write_create() -> Self
Creates options configured for writing, creating the file if needed.
Sourcepub fn set_flag(&self, flag: FileFlag, value: bool) -> bool
pub fn set_flag(&self, flag: FileFlag, value: bool) -> bool
Sets a file-open flag, returning true on success.
Setting FileFlag::CreateNew also sets FileFlag::Create; see
there.
§value == false does not clear a flag
duckdb_file_open_options_set_flag ORs the flag in and ignores
value (src/main/capi/file_system-c.cpp), so a flag cannot be
unset once set. To change your mind, build a fresh FileOpenOptions.
Trait Implementations§
Source§impl Debug for FileOpenOptions
impl Debug for FileOpenOptions
Source§impl Default for FileOpenOptions
impl Default for FileOpenOptions
Source§impl Drop for FileOpenOptions
impl Drop for FileOpenOptions
Auto Trait Implementations§
impl !Send for FileOpenOptions
impl !Sync for FileOpenOptions
impl Freeze for FileOpenOptions
impl RefUnwindSafe for FileOpenOptions
impl Unpin for FileOpenOptions
impl UnsafeUnpin for FileOpenOptions
impl UnwindSafe for FileOpenOptions
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