pub struct Packet(/* private fields */);
Expand description
A packet sent through a port. This is a type-safe wrapper for zx_port_packet_t.
Implementations§
Source§impl Packet
impl Packet
Sourcepub fn from_user_packet(key: u64, status: i32, user: UserPacket) -> Packet
pub fn from_user_packet(key: u64, status: i32, user: UserPacket) -> Packet
Creates a new packet with UserPacket
data.
Sourcepub fn from_guest_mem_packet(
key: u64,
status: i32,
mem: GuestMemPacket,
) -> Packet
pub fn from_guest_mem_packet( key: u64, status: i32, mem: GuestMemPacket, ) -> Packet
Creates a new packet with GuestMemPacket
data.
Sourcepub fn from_guest_io_packet(key: u64, status: i32, io: GuestIoPacket) -> Packet
pub fn from_guest_io_packet(key: u64, status: i32, io: GuestIoPacket) -> Packet
Creates a new packet with GuestIoPacket
data.
Sourcepub fn from_guest_vcpu_packet(
key: u64,
status: i32,
vcpu: GuestVcpuPacket,
) -> Packet
pub fn from_guest_vcpu_packet( key: u64, status: i32, vcpu: GuestVcpuPacket, ) -> Packet
Creates a new packet with GuestVcpuPacket
data.
Sourcepub fn from_power_transition_packet(
key: u64,
status: i32,
power_transition_packet: PowerTransitionPacket,
) -> Packet
pub fn from_power_transition_packet( key: u64, status: i32, power_transition_packet: PowerTransitionPacket, ) -> Packet
Creates a new packet with PowerTransitionPacket
data.
Sourcepub fn contents(&self) -> PacketContents
pub fn contents(&self) -> PacketContents
The contents of the packet.
Trait Implementations§
impl Eq for Packet
impl StructuralPartialEq for Packet
Auto Trait Implementations§
impl Freeze for Packet
impl RefUnwindSafe for Packet
impl Send for Packet
impl Sync for Packet
impl Unpin for Packet
impl UnwindSafe for Packet
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
Mutably borrows from an owned value. Read more