pub struct WriteOptions {
pub synchronous: bool,
}
Expand description
Options for write operations.
Fields§
§synchronous: bool
Whether or not to perform the write operation synchronously.
If true, the program will try to ensure that the write is flusehd completely to disk before it considers the write complete. This extra check means that writes with this flag on will be slower.
If false and the machine crashes, some recent writes might be lost. Note that, if it is just the program that crashes (i.e. the machine does not reboot), then no writes will be lost.
In other words, writes with this flag false
has the same semantics as just a write()
system
call. A write with the flag as true
has the semantics of a write()
followed by an fsync()
.
Defaults to false.
Trait Implementations§
Source§impl Clone for WriteOptions
impl Clone for WriteOptions
Source§fn clone(&self) -> WriteOptions
fn clone(&self) -> WriteOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for WriteOptions
impl Debug for WriteOptions
Auto Trait Implementations§
impl Freeze for WriteOptions
impl RefUnwindSafe for WriteOptions
impl Send for WriteOptions
impl Sync for WriteOptions
impl Unpin for WriteOptions
impl UnwindSafe for WriteOptions
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