pub enum TreeServerSendPreference {
Frozen {
on_failure: Box<TreeServerSendPreference>,
},
Live,
DeepCopy,
}
Expand description
A setting for the fuchsia.inspect.Tree server that indicates how the server should send the Inspector’s VMO. For fallible methods of sending, a fallback is also set.
Variants§
Frozen
Frozen denotes sending a copy-on-write VMO.
on_failure
refers to failure behavior, as not all VMOs
can be frozen. In particular, freezing a VMO requires writing to it,
so if an Inspector is created with a read-only VMO, freezing will fail.
Failure behavior should be one of Live or DeepCopy.
Frozen { on_failure: Live } is the default value of TreeServerSendPreference.
Fields
on_failure: Box<TreeServerSendPreference>
Live
Live denotes sending a live handle to the VMO.
A client might want this behavior if they have time sensitive writes to the VMO, because copy-on-write behavior causes the initial write to a page to be around 1% slower.
DeepCopy
DeepCopy will send a private copy of the VMO. This should probably not be a client’s first choice, as Frozen(DeepCopy) will provide the same semantic behavior while possibly avoiding an expensive copy.
A client might want this behavior if they have time sensitive writes to the VMO, because copy-on-write behavior causes the initial write to a page to be around 1% slower.
Implementations§
Source§impl TreeServerSendPreference
impl TreeServerSendPreference
Sourcepub fn frozen_or(failure_mode: TreeServerSendPreference) -> Self
pub fn frozen_or(failure_mode: TreeServerSendPreference) -> Self
Create a new TreeServerSendPreference
that sends a frozen/copy-on-write VMO of the tree,
falling back to the specified failure_mode
if a frozen VMO cannot be provided.
§Arguments
failure_mode
- Fallback behavior to use if freezing the Inspect VMO fails.
Trait Implementations§
Source§impl Clone for TreeServerSendPreference
impl Clone for TreeServerSendPreference
Source§fn clone(&self) -> TreeServerSendPreference
fn clone(&self) -> TreeServerSendPreference
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for TreeServerSendPreference
impl RefUnwindSafe for TreeServerSendPreference
impl Send for TreeServerSendPreference
impl Sync for TreeServerSendPreference
impl Unpin for TreeServerSendPreference
impl UnwindSafe for TreeServerSendPreference
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)