[][src]Trait phollaits::ToIOResult

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

Required methods

pub 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]

pub 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]

pub 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...