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 more