Skip to main content

Open

Trait Open 

Source
pub trait Open: AsFd + Sized {
    // Required methods
    fn open(domain: Domain, kind: Kind) -> Result<Self, Create>;
    fn adopt(file: OwnedFd) -> Result<Self, Setup>;
    unsafe fn accept(
        &self,
        addr: *mut sockaddr_storage,
        len: *mut socklen_t,
    ) -> Result<Self, Error>;
}

Required Methods§

Source

fn open(domain: Domain, kind: Kind) -> Result<Self, Create>

Source

fn adopt(file: OwnedFd) -> Result<Self, Setup>

Source

unsafe fn accept( &self, addr: *mut sockaddr_storage, len: *mut socklen_t, ) -> Result<Self, Error>

§Safety

Both pointers are null, or name writable full address storage and its returned length. The caller retains that storage through the returned completion.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§