pub struct Kiocb<'a, T> { /* private fields */ }
Expand description
Wrapper for the kernel’s struct kiocb
.
Currently this abstractions is incomplete and is essentially just a tuple containing a reference to a file and a file position.
The type T
represents the filesystem or driver specific data associated with the file.
§Invariants
inner
points at a valid struct kiocb
whose file has the type T
as its private data.
Implementations§
Source§impl<'a, T: ForeignOwnable> Kiocb<'a, T>
impl<'a, T: ForeignOwnable> Kiocb<'a, T>
Sourcepub unsafe fn from_raw(kiocb: *mut kiocb) -> Self
pub unsafe fn from_raw(kiocb: *mut kiocb) -> Self
Create a Kiocb
from a raw pointer.
§Safety
The pointer must reference a valid struct kiocb
for the duration of 'a
. The private
data of the file must be T
.
Sourcepub fn file(&self) -> <T as ForeignOwnable>::Borrowed<'a>
pub fn file(&self) -> <T as ForeignOwnable>::Borrowed<'a>
Get the filesystem or driver specific data associated with the file.
Sourcepub fn ki_pos_mut(&mut self) -> &mut i64
pub fn ki_pos_mut(&mut self) -> &mut i64
Gets a mutable reference to the ki_pos
field.
Auto Trait Implementations§
impl<'a, T> Freeze for Kiocb<'a, T>
impl<'a, T> RefUnwindSafe for Kiocb<'a, T>where
T: RefUnwindSafe,
impl<'a, T> !Send for Kiocb<'a, T>
impl<'a, T> !Sync for Kiocb<'a, T>
impl<'a, T> Unpin for Kiocb<'a, T>
impl<'a, T> UnwindSafe for Kiocb<'a, T>where
T: RefUnwindSafe,
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> PinInit<T> for T
impl<T> PinInit<T> for T
Source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
Initializes
slot
. Read more