Expand description
This crate contains utility functions used in GIDL tests and benchmarks.
Structs§
- Specifies a handle to be created with
create_handles
. Corresponds toHandleDef
in //tools/fidl/gidl/ir/test_case.go.
Enums§
- Handle subtypes that can be created via
create_handles
. Each subtypeX
corresponds to afidl::X
type that implementsHandleBased
.
Functions§
- Copies a raw handle into an owned
HandleBased
handle. - Creates a vector of raw handles based on
defs
. Panics if creating any of the handles fails. The caller is responsible for closing the handles. - Decodes
T
from the given bytes and handles. Panics on failure. - Gets the koid of a handle from its raw handle info. Panics if the
zx_object_get_info
syscall fails. - Returns the result of the
zx_object_get_info
syscall with topicZX_INFO_HANDLE_VALID
. In particular, returnsStatus::BAD_HANDLE
if the handle is dangling because it was already closed or never assigned to the process in the first place. - Returns a vector of
value
repeatedlen
times. - Copies raw handles from the given indices to a new vector of owned
HandleInfo
s. The caller must ensure handles are closed exactly once. - Copies raw handles from the given indices to a new vector.
- Converts a
HandleDisposition
to a rawzx_handle_disposition_t
.