pub struct CommonSynchronousProxy { /* private fields */ }
Implementations§
Source§impl CommonSynchronousProxy
impl CommonSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<CommonEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<CommonEvent, 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 query(
&self,
___deadline: MonotonicInstant,
) -> Result<(BlockInfo, u64), Error>
pub fn query( &self, ___deadline: MonotonicInstant, ) -> Result<(BlockInfo, u64), Error>
Obtains the parameters of the block device (block_info_t
) and the
required size of block_txn_t
. The block_txn_t
s submitted via
Queue()
must have block_op_size_out - sizeof(block_op_t)
bytes
available at the end of the structure for the use of the driver.
Sourcepub fn queue(
&self,
txn: BlockOp,
___deadline: MonotonicInstant,
) -> Result<(i32, BlockOp), Error>
pub fn queue( &self, txn: BlockOp, ___deadline: MonotonicInstant, ) -> Result<(i32, BlockOp), Error>
Submits an I/O request for processing. Ownership of op
is transferred
to callee until completion_cb
is invoked. Success or failure will be
reported via the completion_cb
. This callback may be called before the
Queue()
method returns.
Trait Implementations§
Source§impl Debug for CommonSynchronousProxy
impl Debug for CommonSynchronousProxy
Source§impl SynchronousProxy for CommonSynchronousProxy
impl SynchronousProxy for CommonSynchronousProxy
Source§type Proxy = CommonProxy
type Proxy = CommonProxy
The async proxy for the same protocol.
Source§type Protocol = CommonMarker
type Protocol = CommonMarker
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 CommonSynchronousProxy
impl RefUnwindSafe for CommonSynchronousProxy
impl Send for CommonSynchronousProxy
impl Sync for CommonSynchronousProxy
impl Unpin for CommonSynchronousProxy
impl UnwindSafe for CommonSynchronousProxy
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