pub enum RamdiskRequest {
SetFlags {
flags: RamdiskFlag,
responder: RamdiskSetFlagsResponder,
},
Wake {
responder: RamdiskWakeResponder,
},
SleepAfter {
count: u64,
responder: RamdiskSleepAfterResponder,
},
GetBlockCounts {
responder: RamdiskGetBlockCountsResponder,
},
}
Expand description
The protocol for interacting with a instance of a ramdisk.
Variants§
SetFlags
Sets any of the RAMDISK_FLAG_*
flags.
Wake
Wakes a ramdisk, if it was sleeping.
Resets the block counts being stored by the ramdisk.
Fields
§
responder: RamdiskWakeResponder
SleepAfter
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.
GetBlockCounts
Returns the number of write requests since the last call to either “SleepAfter” or “Wake”.
Fields
§
responder: RamdiskGetBlockCountsResponder
Implementations§
Source§impl RamdiskRequest
impl RamdiskRequest
pub fn into_set_flags(self) -> Option<(RamdiskFlag, RamdiskSetFlagsResponder)>
pub fn into_wake(self) -> Option<RamdiskWakeResponder>
pub fn into_sleep_after(self) -> Option<(u64, RamdiskSleepAfterResponder)>
pub fn into_get_block_counts(self) -> Option<RamdiskGetBlockCountsResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RamdiskRequest
impl !RefUnwindSafe for RamdiskRequest
impl Send for RamdiskRequest
impl Sync for RamdiskRequest
impl Unpin for RamdiskRequest
impl !UnwindSafe for RamdiskRequest
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