Trait proconio::source::Readable

source ·
pub trait Readable {
    type Output;

    // Required method
    fn read<R: BufRead, S: Source<R>>(source: &mut S) -> Self::Output;
}
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: BufRead, S: Source<R>>(source: &mut S) -> Self::Output

Implementors§