pub enum File {
    Null {
        name: Option<FileName>,
    },
    Stdin {
        name: Option<FileName>,
    },
    Stdout {
        name: Option<FileName>,
    },
    Stderr {
        name: Option<FileName>,
    },
    Listen {
        name: FileName,
        addr: String,
        port: u16,
        prot: Protocol,
    },
    Connect {
        name: Option<FileName>,
        host: String,
        port: u16,
        prot: Protocol,
    },
}
Expand description

Parameters for a pre-opened file descriptor

Variants

Null

Fields

name: Option<FileName>

Name assigned to the file descriptor

File descriptor of /dev/null

Stdin

Fields

name: Option<FileName>

Name assigned to the file descriptor

File descriptor of stdin

Stdout

Fields

name: Option<FileName>

Name assigned to the file descriptor

File descriptor of stdout

Stderr

Fields

name: Option<FileName>

Name assigned to the file descriptor

File descriptor of stderr

Listen

Fields

name: FileName

Name assigned to the file descriptor

addr: String

Address to listen on

port: u16

Port to listen on

prot: Protocol

Protocol to use

File descriptor of a TCP listen socket

Connect

Fields

name: Option<FileName>

Name assigned to the file descriptor

host: String

Host address to connect to

port: u16

Port to connect to

prot: Protocol

Protocol to use

File descriptor of a TCP stream socket

Implementations

Get the name for a file descriptor

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.