Struct privsep::imsg::Message[][src]

#[repr(C)]
pub struct Message { pub id: u32, pub length: u16, pub flags: u16, pub peer_id: u32, pub pid: pid_t, }
Expand description

Internal message header.

Fields

id: u32
Expand description

Request type.

length: u16
Expand description

Total message length (header + payload).

flags: u16
Expand description

Optional flags.

peer_id: u32
Expand description

Optional peer ID.

pid: pid_t
Expand description

Local PID.

Implementations

impl Message[src]

pub const RESERVED: u32[src]

pub fn new<T: Into<u32>>(id: T) -> Self[src]

Create new message header.

pub fn min() -> Self[src]

pub fn connect(peer_id: usize) -> Self[src]

Trait Implementations

impl AsBytes for Message[src]

fn only_derive_is_allowed_to_implement_this_trait() where
    Self: Sized
[src]

fn as_bytes(&self) -> &[u8][src]

Get the bytes of this value. Read more

fn as_bytes_mut(&mut self) -> &mut [u8] where
    Self: FromBytes
[src]

Get the bytes of this value mutably. Read more

impl Debug for Message[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for Message[src]

fn default() -> Message[src]

Returns the “default value” for a type. Read more

impl<T: Into<u32>> From<T> for Message[src]

fn from(id: T) -> Self[src]

Performs the conversion.

impl FromBytes for Message[src]

Auto Trait Implementations

impl RefUnwindSafe for Message

impl Send for Message

impl Sync for Message

impl Unpin for Message

impl UnwindSafe for Message

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.