io_lifetimes

Trait IntoHandle

Source
pub trait IntoHandle {
    // Required method
    fn into_handle(self) -> OwnedHandle;
}
👎Deprecated since 1.0.0: IntoHandle is replaced by From<...> for OwnedHandle or Into<OwnedHandle>
Expand description

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

Required Methods§

Source

fn into_handle(self) -> OwnedHandle

👎Deprecated since 1.0.0: IntoHandle is replaced by From<...> for OwnedHandle or Into<OwnedHandle>

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();

Implementors§

Source§

impl<T> IntoHandle for T
where OwnedHandle: From<T>,