Struct mio_aio::LioCbBuilder
source · [−]pub struct LioCbBuilder<'a>(_);
Expand description
Implementations
sourceimpl<'a> LioCbBuilder<'a>
impl<'a> LioCbBuilder<'a>
sourcepub fn emplace_mut_slice(
self,
fd: RawFd,
offset: u64,
buf: &'a mut [u8],
prio: i32,
opcode: LioOpcode
) -> Self
pub fn emplace_mut_slice(
self,
fd: RawFd,
offset: u64,
buf: &'a mut [u8],
prio: i32,
opcode: LioOpcode
) -> Self
Add a new operation on a mutable slice
Arguments
fd
- File descriptor the file to read from or write to.
offset
- Offset within the file to read from or write to.
buf
- Memory location for the data
prio
- I/O priority. Not supported by all operating systems.
opcode
- Should be either LIO_READ
or LIO_WRITE
.
sourcepub fn emplace_slice(
self,
fd: RawFd,
offset: u64,
buf: &'a [u8],
prio: i32,
opcode: LioOpcode
) -> Self
pub fn emplace_slice(
self,
fd: RawFd,
offset: u64,
buf: &'a [u8],
prio: i32,
opcode: LioOpcode
) -> Self
Add a new operation on an immutable mutable slice
Arguments
fd
- File descriptor the file to read from or write to.
offset
- Offset within the file to read from or write to.
buf
- Memory location for the data
prio
- I/O priority. Not supported by all operating systems.
opcode
- Should be either LIO_READ
or LIO_WRITE
.
sourcepub fn finish(self) -> LioCb<'a>
pub fn finish(self) -> LioCb<'a>
Complete the build into an LioCb
, ready to use.
The operating system requires a stable memory location once I/O is
submitted, so no new operations may be added after finish
.
sourcepub fn with_capacity(capacity: usize) -> LioCbBuilder<'a>
pub fn with_capacity(capacity: usize) -> LioCbBuilder<'a>
Create a new LioCbBuilder
with room for capacity
operations.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for LioCbBuilder<'a>
impl<'a> Send for LioCbBuilder<'a>
impl<'a> Sync for LioCbBuilder<'a>
impl<'a> !Unpin for LioCbBuilder<'a>
impl<'a> UnwindSafe for LioCbBuilder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more