Trait phollaits::ToIOResult[][src]

pub trait ToIOResult<T> {
    fn to_io_result(self) -> Result<T>;
}

Required methods

fn to_io_result(self) -> Result<T>[src]

method to convert the underlying type to a std::io::Result.

Loading content...

Implementations on Foreign Types

impl<T, E: ToString> ToIOResult<T> for Result<T, E>[src]

fn to_io_result(self) -> Result<T>[src]

Example

extern crate phollaits;
use phollaits::*;
use std::io;

fn main() -> io::Result<()> {
	let a = Some(1);
	println!("{:?}", a.to_io_result()?);
	Ok(())
}

impl<T> ToIOResult<T> for Option<T>[src]

fn to_io_result(self) -> Result<T>[src]

Example

extern crate phollaits;
use phollaits::*;
use std::io;

fn main() -> io::Result<()> {
	let a = Some(1);
	println!("{:?}", a.to_io_result()?);
	Ok(())
}
Loading content...

Implementors

Loading content...