Trait FromStdin

Source
pub trait FromStdin: Sized {
    type Error: Error;

    // Required method
    fn read_cin(
        cin: &mut Stdin,
        radix: Option<u32>,
    ) -> Result<Self, Self::Error>;
}
Expand description

Type that can be read from standrard input.

Required Associated Types§

Required Methods§

Source

fn read_cin(cin: &mut Stdin, radix: Option<u32>) -> Result<Self, Self::Error>

Reads the value from standrard input with optional radix.

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.

Implementations on Foreign Types§

Source§

impl FromStdin for f32

Source§

type Error = ParseFloatError

Source§

fn read_cin(cin: &mut Stdin, radix: Option<u32>) -> Result<Self, Self::Error>

Source§

impl FromStdin for f64

Source§

type Error = ParseFloatError

Source§

fn read_cin(cin: &mut Stdin, radix: Option<u32>) -> Result<Self, Self::Error>

Source§

impl FromStdin for i8

Source§

type Error = ParseIntError

Source§

fn read_cin(cin: &mut Stdin, radix: Option<u32>) -> Result<Self, Self::Error>

Source§

impl FromStdin for i16

Source§

type Error = ParseIntError

Source§

fn read_cin(cin: &mut Stdin, radix: Option<u32>) -> Result<Self, Self::Error>

Source§

impl FromStdin for i32

Source§

type Error = ParseIntError

Source§

fn read_cin(cin: &mut Stdin, radix: Option<u32>) -> Result<Self, Self::Error>

Source§

impl FromStdin for i64

Source§

type Error = ParseIntError

Source§

fn read_cin(cin: &mut Stdin, radix: Option<u32>) -> Result<Self, Self::Error>

Source§

impl FromStdin for i128

Source§

type Error = ParseIntError

Source§

fn read_cin(cin: &mut Stdin, radix: Option<u32>) -> Result<Self, Self::Error>

Source§

impl FromStdin for isize

Source§

type Error = ParseIntError

Source§

fn read_cin(cin: &mut Stdin, radix: Option<u32>) -> Result<Self, Self::Error>

Source§

impl FromStdin for u8

Source§

type Error = ParseIntError

Source§

fn read_cin(cin: &mut Stdin, radix: Option<u32>) -> Result<Self, Self::Error>

Source§

impl FromStdin for u16

Source§

type Error = ParseIntError

Source§

fn read_cin(cin: &mut Stdin, radix: Option<u32>) -> Result<Self, Self::Error>

Source§

impl FromStdin for u32

Source§

type Error = ParseIntError

Source§

fn read_cin(cin: &mut Stdin, radix: Option<u32>) -> Result<Self, Self::Error>

Source§

impl FromStdin for u64

Source§

type Error = ParseIntError

Source§

fn read_cin(cin: &mut Stdin, radix: Option<u32>) -> Result<Self, Self::Error>

Source§

impl FromStdin for u128

Source§

type Error = ParseIntError

Source§

fn read_cin(cin: &mut Stdin, radix: Option<u32>) -> Result<Self, Self::Error>

Source§

impl FromStdin for usize

Source§

type Error = ParseIntError

Source§

fn read_cin(cin: &mut Stdin, radix: Option<u32>) -> Result<Self, Self::Error>

Source§

impl FromStdin for String

Source§

type Error = FromUtf8Error

Source§

fn read_cin(cin: &mut Stdin, radix: Option<u32>) -> Result<Self, Self::Error>

Implementors§