pub struct ReplyOpen { /* private fields */ }Expand description
Open Reply
Implementations§
Source§impl ReplyOpen
impl ReplyOpen
Sourcepub fn opened(self, fh: FileHandle, flags: FopenFlags)
pub fn opened(self, fh: FileHandle, flags: FopenFlags)
Reply to a request with the given open result
§Panics
When attempting to use kernel passthrough.
Use opened_passthrough() instead.
Sourcepub fn open_backing(&self, fd: impl AsFd) -> Result<BackingId>
pub fn open_backing(&self, fd: impl AsFd) -> Result<BackingId>
Registers a fd for passthrough, returning a BackingId. Once you have the backing ID,
you can pass it as the 3rd parameter of ReplyOpen::opened_passthrough(). This is done in
two separate steps because you must reuse backing IDs for the same inode for all open file handles.
Sourcepub unsafe fn wrap_backing(&self, id: u32) -> BackingId
pub unsafe fn wrap_backing(&self, id: u32) -> BackingId
Wraps a raw FUSE backing_id value, returning a BackingId. Once you have the backing ID,
you can pass it as the 3rd parameter of ReplyOpen::opened_passthrough(). This is done in
two separate steps because you must reuse backing IDs for the same inode for all open file handles.
This function takes ownership of the given backing ID value, automatically closing it once
the returned BackingId is dropped. You may reobtain ownership of the backing ID by calling
BackingId::into_raw().
§Safety
The given ID must be open and belong to this FUSE session, and may not be closed while the
returned BackingId instance is still live.
Sourcepub fn opened_passthrough(
self,
fh: FileHandle,
flags: FopenFlags,
backing_id: &BackingId,
)
pub fn opened_passthrough( self, fh: FileHandle, flags: FopenFlags, backing_id: &BackingId, )
Reply to a request with an opened backing id. Call ReplyOpen::open_backing()
to get one of these.
Note that you must reuse the given BackingId for all future ReplyOpen::opened_passthrough()
invocations as long as the passed file handle stays open!