pub struct HandleInfo { /* private fields */ }
Expand description
Metadata information for a handle in a processargs message. Contains a handle type and an unsigned 16-bit value, whose meaning is handle type dependent.
Implementations§
Source§impl HandleInfo
impl HandleInfo
Sourcepub const fn new(htype: HandleType, arg: u16) -> Self
pub const fn new(htype: HandleType, arg: u16) -> Self
Create a handle info struct from a handle type and an argument.
For example, a HandleInfo::new(HandleType::FileDescriptor, 32)
identifies
the respective handle as file descriptor 32.
Corresponds to PA_HND in processargs.h.
Sourcepub fn handle_type(&self) -> HandleType
pub fn handle_type(&self) -> HandleType
Returns the handle type for this handle info struct.
Trait Implementations§
Source§impl Clone for HandleInfo
impl Clone for HandleInfo
Source§fn clone(&self) -> HandleInfo
fn clone(&self) -> HandleInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for HandleInfo
impl Debug for HandleInfo
Source§impl From<HandleType> for HandleInfo
impl From<HandleType> for HandleInfo
An implementation of the From trait to create a HandleInfo from a HandleType with an argument of 0.
Source§fn from(ty: HandleType) -> Self
fn from(ty: HandleType) -> Self
Source§impl PartialEq for HandleInfo
impl PartialEq for HandleInfo
Source§impl TryFrom<u32> for HandleInfo
impl TryFrom<u32> for HandleInfo
Source§fn try_from(value: u32) -> Result<HandleInfo, HandleInfoError>
fn try_from(value: u32) -> Result<HandleInfo, HandleInfoError>
Attempt to convert a u32 to a handle ID value. Can fail if the value represents an unknown handle type or is otherwise invalid.
Useful to convert existing handle info values received through FIDL APIs, e.g. from a client that creates them using the PA_HND macro in processargs.h from C/C++.
Source§type Error = HandleInfoError
type Error = HandleInfoError
impl Copy for HandleInfo
impl Eq for HandleInfo
impl StructuralPartialEq for HandleInfo
Auto Trait Implementations§
impl Freeze for HandleInfo
impl RefUnwindSafe for HandleInfo
impl Send for HandleInfo
impl Sync for HandleInfo
impl Unpin for HandleInfo
impl UnwindSafe for HandleInfo
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
)