pub struct WriteOp<'a, H>(/* private fields */);Expand description
A positional write borrowing its handle and payload without copying either.
Construction performs no I/O or allocation. Does not change the file cursor.
Uses the same storage definition as the native crate::WriteOp.
Implementations§
Source§impl<'a, H> WriteOp<'a, H>
impl<'a, H> WriteOp<'a, H>
Sourcepub fn new(file: &'a H, offset: u64, data: &'a [u8]) -> WriteOp<'a, H>
pub fn new(file: &'a H, offset: u64, data: &'a [u8]) -> WriteOp<'a, H>
Borrow a handle and payload at an absolute byte offset.
Sourcepub fn at(file: &'a H, offset: u64, data: &'a [u8]) -> WriteOp<'a, H>
pub fn at(file: &'a H, offset: u64, data: &'a [u8]) -> WriteOp<'a, H>
Borrow a handle and payload at an absolute byte offset.
pub fn file(&self) -> &'a H
pub fn offset(&self) -> u64
pub fn data(&self) -> &'a [u8] ⓘ
Trait Implementations§
Auto Trait Implementations§
impl<'a, H> Freeze for WriteOp<'a, H>
impl<'a, H> RefUnwindSafe for WriteOp<'a, H>
impl<'a, H> Send for WriteOp<'a, H>
impl<'a, H> Sync for WriteOp<'a, H>
impl<'a, H> Unpin for WriteOp<'a, H>
impl<'a, H> UnsafeUnpin for WriteOp<'a, H>
impl<'a, H> UnwindSafe for WriteOp<'a, H>
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