pub struct StreamIoConnection<T: 'static + File + GetVmo> { /* private fields */ }
Expand description
Wrapper around a file that forwards File
requests to file
and
FileIo
requests to stream
.
Implementations§
Source§impl<T: 'static + File + GetVmo> StreamIoConnection<T>
impl<T: 'static + File + GetVmo> StreamIoConnection<T>
Sourcepub fn create(
scope: ExecutionScope,
file: Arc<T>,
options: impl ToFileOptions,
object_request: ObjectRequestRef<'_>,
) -> Result<impl Future<Output = ()>, Status>
pub fn create( scope: ExecutionScope, file: Arc<T>, options: impl ToFileOptions, object_request: ObjectRequestRef<'_>, ) -> Result<impl Future<Output = ()>, Status>
Creates a stream-based file connection. A stream based file connection sends a zx::stream to
clients that can be used for issuing read, write, and seek calls. Any read, write, and seek
calls that continue to come in over FIDL will be forwarded to stream
instead of being sent
to file
.
Sourcepub fn spawn(
scope: ExecutionScope,
file: Arc<T>,
options: FileOptions,
object_request: ObjectRequestRef<'_>,
) -> Result<(), Status>
pub fn spawn( scope: ExecutionScope, file: Arc<T>, options: FileOptions, object_request: ObjectRequestRef<'_>, ) -> Result<(), Status>
Like create, but spawns a task to run the connection.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for StreamIoConnection<T>
impl<T> RefUnwindSafe for StreamIoConnection<T>where
T: RefUnwindSafe,
impl<T> Send for StreamIoConnection<T>
impl<T> Sync for StreamIoConnection<T>
impl<T> Unpin for StreamIoConnection<T>
impl<T> UnwindSafe for StreamIoConnection<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