pub struct RamdiskSynchronousProxy { /* private fields */ }
Implementations§
Source§impl RamdiskSynchronousProxy
impl RamdiskSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<RamdiskEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<RamdiskEvent, 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 set_flags(
&self,
flags: RamdiskFlag,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn set_flags( &self, flags: RamdiskFlag, ___deadline: MonotonicInstant, ) -> Result<(), Error>
Sets any of the RAMDISK_FLAG_*
flags.
Sourcepub fn wake(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
pub fn wake(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
Wakes a ramdisk, if it was sleeping.
Resets the block counts being stored by the ramdisk.
Sourcepub fn sleep_after(
&self,
count: u64,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn sleep_after( &self, count: u64, ___deadline: MonotonicInstant, ) -> Result<(), Error>
Causes the ramdisk to sleep after count
blocks are written successfully.
After count
blocks are written, requests either wait for the ramdisk to
be awoken (if RESUME_ON_WAKE has been set), or begin failing immediately.
Resets the block counts being stored by the ramdisk.
Sourcepub fn get_block_counts(
&self,
___deadline: MonotonicInstant,
) -> Result<BlockWriteCounts, Error>
pub fn get_block_counts( &self, ___deadline: MonotonicInstant, ) -> Result<BlockWriteCounts, Error>
Returns the number of write requests since the last call to either “SleepAfter” or “Wake”.
Trait Implementations§
Source§impl Debug for RamdiskSynchronousProxy
impl Debug for RamdiskSynchronousProxy
Source§impl SynchronousProxy for RamdiskSynchronousProxy
impl SynchronousProxy for RamdiskSynchronousProxy
Source§type Proxy = RamdiskProxy
type Proxy = RamdiskProxy
The async proxy for the same protocol.
Source§type Protocol = RamdiskMarker
type Protocol = RamdiskMarker
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 RamdiskSynchronousProxy
impl RefUnwindSafe for RamdiskSynchronousProxy
impl Send for RamdiskSynchronousProxy
impl Sync for RamdiskSynchronousProxy
impl Unpin for RamdiskSynchronousProxy
impl UnwindSafe for RamdiskSynchronousProxy
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