Trait io_lifetimes::IntoHandle[][src]

pub trait IntoHandle {
    fn into_handle(self) -> OwnedHandle;
}
Expand description

A trait to express the ability to consume an object and acquire ownership of its handle.

Required methods

Consumes this object, returning the underlying handle.

Example

use std::fs::File;
use io_lifetimes::{IntoHandle, OwnedHandle};

let f = File::open("foo.txt")?;
let owned_handle: OwnedHandle = f.into_handle();

Implementations on Foreign Types

Implementors