#[non_exhaustive]
pub enum StreamError {
    InvalidStream {
        source: &'static Location<'static>,
    },
    StreamReset {
        error: Error,
        source: &'static Location<'static>,
    },
    SendAfterFinish {
        source: &'static Location<'static>,
    },
    MaxStreamDataSizeExceeded {
        source: &'static Location<'static>,
    },
    ConnectionError {
        error: Error,
    },
    NonReadable {
        source: &'static Location<'static>,
    },
    NonWritable {
        source: &'static Location<'static>,
    },
    SendingBlocked {
        source: &'static Location<'static>,
    },
    NonEmptyOutput {
        source: &'static Location<'static>,
    },
}
Expand description

Errors that a stream can encounter.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

InvalidStream

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
source: &'static Location<'static>

The Stream ID which was referenced is invalid

This could mean the ID is no longer tracked by the Connection.

StreamReset

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
error: Error
source: &'static Location<'static>

The Stream had been reset by the peer via a RESET_STREAM frame.

Inside this frame the peer will deliver an error code, which will be provided by the parameter.

SendAfterFinish

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
source: &'static Location<'static>

A send attempt had been performed on a Stream after it was closed

MaxStreamDataSizeExceeded

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
source: &'static Location<'static>

Attempting to write data would exceed the stream limit

This is caused because the maximum possible amount of data (2^62-1 bytes) had already been written to the Stream.

ConnectionError

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
error: Error

The Stream was reset due to a Connection Error

NonReadable

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
source: &'static Location<'static>

The stream is not readable

NonWritable

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
source: &'static Location<'static>

The stream is not writable

SendingBlocked

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
source: &'static Location<'static>

The stream is blocked on writing data

This is caused by trying to send data before polling readiness

NonEmptyOutput

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
source: &'static Location<'static>

The stream was provided a non-empty placeholder buffer for receiving data.

The application should ensure only empty buffers are provided to receive calls, otherwise it can lead to data loss on the stream.

Implementations

Returns the panic::Location for the error

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

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

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

This method tests for !=.

Returns the associated Error, if any

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

Converts the given value to a String. 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.