#[repr(C)]pub struct IpcHandshakeReply {
pub magic: u32,
pub protocol_version: u16,
pub status: u16,
pub server_abi_major: u16,
pub server_abi_minor: u16,
pub flags: u32,
}Expand description
Server reply to a handshake.
Wire size: 16 bytes.
§Fields
magic: echo ofIPC_HANDSHAKE_MAGICprotocol_version: server’s IPC protocol versionstatus: result code (IPC_HANDSHAKE_OK,_VERSION_MISMATCH, or_REJECTED)server_abi_major/minor: server’s ABI versionflags: reserved for future use
Fields§
§magic: u32Echo of the handshake magic.
protocol_version: u16Server’s IPC protocol version.
status: u16Handshake status code.
server_abi_major: u16Server ABI major version.
server_abi_minor: u16Server ABI minor version.
flags: u32Reserved flags.
Implementations§
Source§impl IpcHandshakeReply
impl IpcHandshakeReply
Sourcepub const fn reject(status: u16) -> Self
pub const fn reject(status: u16) -> Self
Build a rejected handshake reply with an explicit status code.
Sourcepub fn has_reserved_bits_set(&self) -> bool
pub fn has_reserved_bits_set(&self) -> bool
Return true when any reserved field is non-zero
(see IpcHandshake::has_reserved_bits_set).
Trait Implementations§
Source§impl Clone for IpcHandshakeReply
impl Clone for IpcHandshakeReply
Source§fn clone(&self) -> IpcHandshakeReply
fn clone(&self) -> IpcHandshakeReply
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for IpcHandshakeReply
Source§impl Debug for IpcHandshakeReply
impl Debug for IpcHandshakeReply
Source§impl FromBytes for IpcHandshakeReply
impl FromBytes for IpcHandshakeReply
Source§impl FromZeros for IpcHandshakeReply
impl FromZeros for IpcHandshakeReply
impl Immutable for IpcHandshakeReply
Source§impl IntoBytes for IpcHandshakeReply
impl IntoBytes for IpcHandshakeReply
§fn as_mut_bytes(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
fn as_mut_bytes(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
Gets the bytes of this value mutably. Read more
§fn write_to(&self, dst: &mut [u8]) -> Result<(), SizeError<&Self, &mut [u8]>>where
Self: Immutable,
fn write_to(&self, dst: &mut [u8]) -> Result<(), SizeError<&Self, &mut [u8]>>where
Self: Immutable,
Source§impl TryFromBytes for IpcHandshakeReply
impl TryFromBytes for IpcHandshakeReply
§fn try_read_from_bytes(
source: &[u8],
) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_bytes(
source: &[u8],
) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
§fn try_read_from_prefix(
source: &[u8],
) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_prefix(
source: &[u8],
) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
§fn try_read_from_suffix(
source: &[u8],
) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_suffix(
source: &[u8],
) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
Auto Trait Implementations§
impl Freeze for IpcHandshakeReply
impl RefUnwindSafe for IpcHandshakeReply
impl Send for IpcHandshakeReply
impl Sync for IpcHandshakeReply
impl Unpin for IpcHandshakeReply
impl UnsafeUnpin for IpcHandshakeReply
impl UnwindSafe for IpcHandshakeReply
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