pub struct GuestCrashDevice { /* private fields */ }
Expand description
The crash device.
Implementations§
Source§impl GuestCrashDevice
impl GuestCrashDevice
Sourcepub fn new(
request_dump: Sender<FailableRpc<OneshotReceiver<()>, File>>,
max_dump_size: u64,
) -> Self
pub fn new( request_dump: Sender<FailableRpc<OneshotReceiver<()>, File>>, max_dump_size: u64, ) -> Self
Makes a new crash device.
When the guest requests a crash dump, the device will send a request to
request_dump
to retrieve the file to write to. When the dump completes
successfully, the device will send an empty message to the provided
oneshot channel.
Sourcepub fn into_inner(self) -> (Sender<FailableRpc<OneshotReceiver<()>, File>>, u64)
pub fn into_inner(self) -> (Sender<FailableRpc<OneshotReceiver<()>, File>>, u64)
Deconstructs the object, returning the original resources passed to
new
.
Trait Implementations§
Source§impl InspectMut for GuestCrashDevice
impl InspectMut for GuestCrashDevice
Source§fn inspect_mut(&mut self, req: Request<'_>)
fn inspect_mut(&mut self, req: Request<'_>)
Inspects the object.
Source§impl SimpleVmbusDevice for GuestCrashDevice
impl SimpleVmbusDevice for GuestCrashDevice
Source§type SavedState = SavedStateNotSupported
type SavedState = SavedStateNotSupported
The saved state type.
Source§type Runner = GuestCrashChannel
type Runner = GuestCrashChannel
The type used to run an open channel.
Source§fn inspect(&mut self, req: Request<'_>, runner: Option<&mut Self::Runner>)
fn inspect(&mut self, req: Request<'_>, runner: Option<&mut Self::Runner>)
Inspects a channel.
Source§fn open(
&mut self,
channel: RawAsyncChannel<GpadlRingMem>,
_guest_memory: GuestMemory,
) -> Result<Self::Runner, ChannelOpenError>
fn open( &mut self, channel: RawAsyncChannel<GpadlRingMem>, _guest_memory: GuestMemory, ) -> Result<Self::Runner, ChannelOpenError>
Opens the channel, returning the runner to use to run the channel. Read more
Source§fn run<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
stop: &'life1 mut StopTask<'life2>,
runner: &'life3 mut Self::Runner,
) -> Pin<Box<dyn Future<Output = Result<(), Cancelled>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn run<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
stop: &'life1 mut StopTask<'life2>,
runner: &'life3 mut Self::Runner,
) -> Pin<Box<dyn Future<Output = Result<(), Cancelled>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Runs an open channel until
stop
is signaled.Source§fn supports_save_restore(
&mut self,
) -> Option<&mut dyn SaveRestoreSimpleVmbusDevice<SavedState = Self::SavedState, Runner = Self::Runner>>
fn supports_save_restore( &mut self, ) -> Option<&mut dyn SaveRestoreSimpleVmbusDevice<SavedState = Self::SavedState, Runner = Self::Runner>>
Returns a trait used to save/restore the device. Read more
Auto Trait Implementations§
impl Freeze for GuestCrashDevice
impl !RefUnwindSafe for GuestCrashDevice
impl Send for GuestCrashDevice
impl Sync for GuestCrashDevice
impl Unpin for GuestCrashDevice
impl !UnwindSafe for GuestCrashDevice
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