Skip to main content

Source

Trait Source 

Source
pub trait Source: Source {
    // Provided methods
    unsafe fn accept<E: From<Errno>>(
        file: BorrowedFd<'_>,
        addr: *mut sockaddr,
        len: *mut socklen_t,
    ) -> Result<OwnedFd, E> { ... }
    unsafe fn send<X: Extent, E: From<Errno>>(
        file: BorrowedFd<'_>,
        ptr: *const u8,
        len: X::Length,
    ) -> Result<X::Length, E> { ... }
    unsafe fn sendmsg<E: From<Errno>>(
        file: BorrowedFd<'_>,
        header: &Header,
        flags: c_int,
    ) -> Result<U32<0, { _ }>, E> { ... }
}
Expand description

Native access to operations retaining caller-owned socket storage.

Provided Methods§

Source

unsafe fn accept<E: From<Errno>>( file: BorrowedFd<'_>, addr: *mut sockaddr, len: *mut socklen_t, ) -> Result<OwnedFd, E>

§Safety

Both pointers are null, or name writable sockaddr storage and its capacity for this call. The caller retains that storage through the returned completion.

Source

unsafe fn send<X: Extent, E: From<Errno>>( file: BorrowedFd<'_>, ptr: *const u8, len: X::Length, ) -> Result<X::Length, E>

§Safety

The pointer retains a readable input prefix of exactly len bytes for this call. Its original extent preserves the ABI bound and owns the input graph.

Source

unsafe fn sendmsg<E: From<Errno>>( file: BorrowedFd<'_>, header: &Header, flags: c_int, ) -> Result<U32<0, { _ }>, E>

§Safety

Header is the frozen root of a live input graph, with a total byte count bounded by i32::MAX; its pointees outlive this call.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Source> Source for T