clone_handle

Function clone_handle 

Source
pub fn clone_handle<H: HandleBased>(handle: &H) -> H
Expand description

Clones a handle infallibly with zx::Rights::SAME_RIGHTS.

This function duplicates a handle, preserving its rights. It will panic if the handle duplication fails, which is not expected to happen under normal circumstances.

§Args

  • handle: A reference to a handle-based object to be cloned.

§Returns

A new handle with the same rights as the original.