Trait Readable

Source
pub trait Readable {
    type Output;

    // Required method
    fn read<R, S>(source: &mut S) -> Self::Output
       where R: BufRead,
             S: Source<R>;
}
Expand description

A trait representing which type can be read from Source.

If you want to read your own type using input!, you can implement this trait for your type. Alternatively, you can add #[derive_readable] if you put use proconio_derive::derive_readable in your source. It automatically implements Readable if all members of your type are Readable.

Required Associated Types§

Required Methods§

Source

fn read<R, S>(source: &mut S) -> Self::Output
where R: BufRead, S: Source<R>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§