pub enum TreeRequest {
GetContent {
responder: TreeGetContentResponder,
},
ListChildNames {
tree_iterator: ServerEnd<TreeNameIteratorMarker>,
control_handle: TreeControlHandle,
},
OpenChild {
child_name: String,
tree: ServerEnd<TreeMarker>,
control_handle: TreeControlHandle,
},
_UnknownMethod {
ordinal: u64,
control_handle: TreeControlHandle,
method_type: MethodType,
},
}
Expand description
The Tree protocol represents a hierarchy of Inspect VMOs.
Link values stored in an Inspect file contain references to new named files that contain a continuation of the data for the overall hierarchy. Protocol Tree allows clients to request these named files so long as the hosting component is still alive.
Connecting to a particular tree keeps the content for that Tree resident in memory. Clients are recommended to traverse the trees in depth-first order to reduce memory usage. Serving components are free to deny connections to avoid unbounded memory usage.
Variants§
GetContent
Get the content for the Inspect VMO backing this tree.
So long as the Tree connection is still maintained, the contents of the tree are guaranteed to still be live. Once the connection is lost, the serving component is free to clear the contents of returned shared buffers.
Serving components may return different buffers to GetContent requests for the same Tree.
Fields
responder: TreeGetContentResponder
ListChildNames
Iterate over the names of Trees that are children of this Tree.
The underlying list of children may change in between calls to ListChildNames and OpenChild.
OpenChild
Open a child Tree by name.
If the child cannot be opened, the given request is closed.
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: TreeControlHandle
method_type: MethodType
Implementations§
Source§impl TreeRequest
impl TreeRequest
pub fn into_get_content(self) -> Option<TreeGetContentResponder>
pub fn into_list_child_names( self, ) -> Option<(ServerEnd<TreeNameIteratorMarker>, TreeControlHandle)>
pub fn into_open_child( self, ) -> Option<(String, ServerEnd<TreeMarker>, TreeControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL