Skip to content

Add InProgress variant to io::ErrorKind #92

Closed
@aviramha

Description

@aviramha

Proposal

Add InProgress variant to io::ErrorKind to support cases where OS error is libc::EINPROGRESS

Problem statement

While working on API that relies on io::last_os_error I found out that kind field of io::Error is set to Uncategorized which means I can't "safely" use .kind() to check if it's a specific error, in our case libc::EINPROGRESS

Motivation, use-cases

Our code example that can be simplified given the addition.

Solution sketches

Links and related work

Sent a PR of the proposed change
rust-lang/rust#101155 (review)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ACP-acceptedAPI Change Proposal is accepted (seconded with no objections)T-libs-apiapi-change-proposalA proposal to add or alter unstable APIs in the standard libraries

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions