[−][src]Enum interprocess::os::unix::udsocket::AncillaryData
Ancillary data to be sent through a Unix domain socket or read from an input buffer.
Ancillary data gives unique possibilities to Unix domain sockets which no other POSIX API has: passing file descriptors between two processes which do not have a parent-child relationship. It also can be used to transfer credentials of a process reliably.
Variants
One or more file descriptors to be sent.
Credentials to be sent. The specified values are checked by the system when sent for all users except for the superuser — for senders, this means that the correct values need to be filled out, otherwise, an error is returned; for receivers, this means that the credentials are to be trusted for authentification purposes. For convenience, the credentials
function provides a value which is known to be valid when sent.
Fields of Credentials
Implementations
impl<'a> AncillaryData<'a>
[src]
pub const ENCODED_SIZE_OF_CREDENTIALS: usize
[src]
The size of a single AncillaryData::Credentials
element when packed into the Unix ancillary data format. Useful for allocating a buffer when you expect to receive credentials.
pub const fn encoded_size_of_file_descriptors(num_descriptors: usize) -> usize
[src]
Calculates the size of an AncillaryData::FileDescriptors
element with the specified amount of file descriptors when packed into the Unix ancillary data format. Useful for allocating a buffer when you expect to receive a specific amount of file descriptors.
pub fn clone_ref(&'a self) -> Self
[src]
Inexpensievly clones self
by borrowing the FileDescriptors
variant or copying the Credentials
variant.
pub fn encoded_size(&self) -> usize
[src]
Returns the size of an ancillary data element when packed into the Unix ancillary data format.
impl AncillaryData<'static>
[src]
pub fn credentials() -> Self
[src]
Fetches the credentials of the process from the system and returns a value which can be safely sent to another process without the system complaining about an unauthorized attempt to impersonate another process/user/group.
If you want to send credentials to another process, this is usually the function you need to obtain the desired ancillary payload.
Trait Implementations
impl<'a> Clone for AncillaryData<'a>
[src]
fn clone(&self) -> AncillaryData<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for AncillaryData<'a>
[src]
impl<'a> Eq for AncillaryData<'a>
[src]
impl<'a> Hash for AncillaryData<'a>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> PartialEq<AncillaryData<'a>> for AncillaryData<'a>
[src]
fn eq(&self, other: &AncillaryData<'a>) -> bool
[src]
fn ne(&self, other: &AncillaryData<'a>) -> bool
[src]
impl<'a> StructuralEq for AncillaryData<'a>
[src]
impl<'a> StructuralPartialEq for AncillaryData<'a>
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,