pub enum AncillaryData<'a> {
ScmRights(ScmRights<'a>),
ScmCredentials(ScmCredentials<'a>),
}
🔬This is a nightly-only experimental API. (
unix_socket_ancillary_data
#76915)Available on Unix and (Android or Linux) only.
Expand description
This enum represent one control message of variable type.
Variants§
ScmRights(ScmRights<'a>)
🔬This is a nightly-only experimental API. (
unix_socket_ancillary_data
#76915)ScmCredentials(ScmCredentials<'a>)
🔬This is a nightly-only experimental API. (
unix_socket_ancillary_data
#76915)Implementations§
Source§impl<'a> AncillaryData<'a>
impl<'a> AncillaryData<'a>
Sourceunsafe fn as_rights(data: &'a [u8]) -> Self
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
.
Sourceunsafe fn as_credentials(data: &'a [u8]) -> Self
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> UnwindSafe for AncillaryData<'a>
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
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)] const IS_ZST: bool = _
#[doc(hidden)] const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)Source§#[doc(hidden)] const LAYOUT: Layout = _
#[doc(hidden)] const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)Source§#[doc(hidden)] const MAX_SLICE_LEN: usize = _
#[doc(hidden)] const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)The largest safe length for a
[Self]
. Read more