pub struct FileBackedVolumeProviderSynchronousProxy { /* private fields */ }
Implementations§
Source§impl FileBackedVolumeProviderSynchronousProxy
impl FileBackedVolumeProviderSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<FileBackedVolumeProviderEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<FileBackedVolumeProviderEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn open(
&self,
parent_directory_token: Handle,
name: &str,
server_end: ServerEnd<VolumeMarker>,
) -> Result<(), Error>
pub fn open( &self, parent_directory_token: Handle, name: &str, server_end: ServerEnd<VolumeMarker>, ) -> Result<(), Error>
Opens a file as a block device and starts serving block requests.
name
must refer to an existing file in the directory represented by
parent_directory_token
.
The block size of the device will match the underlying filesystem’s block size. If the file’s size is not a multiple of the block size, the apparent size of the device will be rounded down.
parent_directory_token
is a token obtained via fuchsia.io.Directory/GetToken
. The
directory connection must have the MODIFY_DIRECTORY
right.
Errors will be sent as an epitaph on server_end
.
Trait Implementations§
Source§impl From<FileBackedVolumeProviderSynchronousProxy> for Handle
impl From<FileBackedVolumeProviderSynchronousProxy> for Handle
Source§fn from(value: FileBackedVolumeProviderSynchronousProxy) -> Self
fn from(value: FileBackedVolumeProviderSynchronousProxy) -> Self
Converts to this type from the input type.
Source§impl FromClient for FileBackedVolumeProviderSynchronousProxy
impl FromClient for FileBackedVolumeProviderSynchronousProxy
Source§type Protocol = FileBackedVolumeProviderMarker
type Protocol = FileBackedVolumeProviderMarker
The protocol.
Source§fn from_client(value: ClientEnd<FileBackedVolumeProviderMarker>) -> Self
fn from_client(value: ClientEnd<FileBackedVolumeProviderMarker>) -> Self
Converts from a client.
Source§impl SynchronousProxy for FileBackedVolumeProviderSynchronousProxy
impl SynchronousProxy for FileBackedVolumeProviderSynchronousProxy
Source§type Proxy = FileBackedVolumeProviderProxy
type Proxy = FileBackedVolumeProviderProxy
The async proxy for the same protocol.
Source§type Protocol = FileBackedVolumeProviderMarker
type Protocol = FileBackedVolumeProviderMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for FileBackedVolumeProviderSynchronousProxy
impl RefUnwindSafe for FileBackedVolumeProviderSynchronousProxy
impl Send for FileBackedVolumeProviderSynchronousProxy
impl Sync for FileBackedVolumeProviderSynchronousProxy
impl Unpin for FileBackedVolumeProviderSynchronousProxy
impl UnwindSafe for FileBackedVolumeProviderSynchronousProxy
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