pub struct DirectWriter<'a, S: HandleOwner> { /* private fields */ }
Expand description
Like object_handle::Writer, but allows custom transaction options to be set, and makes every write go directly to the handle in a transaction.
Implementations§
Source§impl<'a, S: HandleOwner> DirectWriter<'a, S>
impl<'a, S: HandleOwner> DirectWriter<'a, S>
pub async fn new( handle: &'a DataObjectHandle<S>, options: Options<'a>, ) -> DirectWriter<'a, S>
Trait Implementations§
Source§impl<S: HandleOwner> Drop for DirectWriter<'_, S>
impl<S: HandleOwner> Drop for DirectWriter<'_, S>
Source§impl<'a, S: HandleOwner> WriteBytes for DirectWriter<'a, S>
impl<'a, S: HandleOwner> WriteBytes for DirectWriter<'a, S>
fn block_size(&self) -> u64
Source§async fn write_bytes(&mut self, buf: &[u8]) -> Result<(), Error>
async fn write_bytes(&mut self, buf: &[u8]) -> Result<(), Error>
Buffers writes to be written to the underlying handle. This may flush bytes immediately
or when buffers are full.
Auto Trait Implementations§
impl<'a, S> Freeze for DirectWriter<'a, S>
impl<'a, S> !RefUnwindSafe for DirectWriter<'a, S>
impl<'a, S> Send for DirectWriter<'a, S>
impl<'a, S> Sync for DirectWriter<'a, S>
impl<'a, S> Unpin for DirectWriter<'a, S>
impl<'a, S> !UnwindSafe for DirectWriter<'a, S>
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more