Skip to content

<FutureReader<T> as IntoFuture>::Output should be Result<T, ErrorContext> #1174

@dicej

Description

@dicej

Currently, <FutureReader<T> as IntoFuture>::Output is Option<Result<T, ErrorContext>>, but that's due to my earlier, incorrect understanding of the spec. The spec says the owner of the write end of the future must either write a value before closing it or close it with an error, so the only two possible outcomes for the read end are a value or an error. And note that if the writer writes a value and then closes it with an error, the error will be silently dropped, just like it would be if the reader had already explicitly closed its end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions