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 Twhere OwnedHandle: From<T>,