Skip to content

Please consider supporting AsFd #134

Closed
@joshtriplett

Description

@joshtriplett

Currently, most methods async_io::Async requires the type it wraps to implement AsRawFd, or AsRawSocket on Windows.

The standard library now supports the safe alternative AsFd (or AsSocket on Windows), and async-io has some support for this. However, it doesn't seem possible to create an Async<T> for a type that implements AsFd but not AsRawFd.

I have types I'd love to use Async with, and I'd like to drop the implementation of AsRawFd for those types. (This would also eliminate unsafe code.)

Please consider adding a constructor for Async<T> where T: AsFd.

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