Enum AncillaryData

pub enum AncillaryData<'a>

This enum represent one control message of variable type.

Variants

ScmRights(ScmRights<'a>)
ScmCredentials(ScmCredentials<'a>)

Implementations

impl<'a> AncillaryData<'a>

unsafe fn as_rights(data: &'a [u8]) -> Self

Creates an AncillaryData::ScmRights variant.

Safety

data must contain a valid control message and the control message must be type of SOL_SOCKET and level of SCM_RIGHTS.

unsafe fn as_credentials(data: &'a [u8]) -> Self

Creates an AncillaryData::ScmCredentials variant.

Safety

data must contain a valid control message and the control message must be type of SOL_SOCKET and level of SCM_CREDENTIALS or SCM_CREDS.

fn try_from_cmsghdr(cmsg: &'a cmsghdr) -> Result<Self, AncillaryError>

Auto Trait Implementations

impl<'a> Freeze for AncillaryData<'a>

impl<'a> RefUnwindSafe for AncillaryData<'a>

impl<'a> Send for AncillaryData<'a>

impl<'a> Sync for AncillaryData<'a>

impl<'a> Unpin for AncillaryData<'a>

impl<'a> UnsafeUnpin for AncillaryData<'a>

impl<'a> UnwindSafe for AncillaryData<'a>

Blanket Implementations

impl<T> Any for AncillaryData<'a> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for AncillaryData<'a> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for AncillaryData<'a> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for AncillaryData<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for AncillaryData<'a> where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for AncillaryData<'a>

impl<T, U> Into<U> for AncillaryData<'a> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for AncillaryData<'a> where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for AncillaryData<'a> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>