Shutdown in std::net - Rust (original) (raw)

pub enum Shutdown {
    Read,
    Write,
    Both,
}

Expand description

§1.0.0

The reading portion of the TcpStream should be shut down.

All currently blocked and future reads will return [Ok](../result/enum.Result.html#variant.Ok "variant std::result::Result::Ok")(0).

§1.0.0

The writing portion of the TcpStream should be shut down.

All currently blocked and future writes will return an error.

§1.0.0

1.0.0 · source§

1.0.0 · source§

1.0.0 · source§

source§

Tests for self and other values to be equal, and is used by ==.

1.0.0 · source§

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

1.0.0 · source§

1.0.0 · source§

1.0.0 · source§

§

§

§

§

§

§

source§

source§

source§

source§

source§

🔬This is a nightly-only experimental API. (clone_to_uninit #126799)

Performs copy-assignment from self to dst. Read more

source§

source§

Returns the argument unchanged.

source§

source§

Calls U::from(self).

That is, this conversion is whatever the implementation of[From](../convert/trait.From.html "trait std::convert::From")<T> for U chooses to do.

source§

§

The resulting type after obtaining ownership.

source§

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

source§

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

source§

§

The type returned in the event of a conversion error.

source§

Performs the conversion.

source§

§

The type returned in the event of a conversion error.

source§

Performs the conversion.