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
Create 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
Create 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> 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