Trait smart_read::TryRead

source ·
pub trait TryRead {
    type Output;

    // Required method
    fn try_read_line(
        &self,
        read_args: TryReadArgs<Self::Output>
    ) -> BoxResult<Self::Output>;
}
Expand description

This is what powers the whole crate. Any struct that implements this can be used with the macros

Required Associated Types§

Required Methods§

source

fn try_read_line( &self, read_args: TryReadArgs<Self::Output> ) -> BoxResult<Self::Output>

Implementations on Foreign Types§

source§

impl TryRead for ()

§

type Output = String

source§

fn try_read_line( &self, read_args: TryReadArgs<Self::Output> ) -> BoxResult<Self::Output>

source§

impl<T: Display + Clone + PartialEq> TryRead for &[T]

§

type Output = T

source§

fn try_read_line( &self, read_args: TryReadArgs<Self::Output> ) -> BoxResult<Self::Output>

source§

impl<T: Display + Clone + PartialEq> TryRead for LinkedList<T>

§

type Output = T

source§

fn try_read_line( &self, read_args: TryReadArgs<Self::Output> ) -> BoxResult<Self::Output>

source§

impl<T: Display + Clone + PartialEq> TryRead for VecDeque<T>

§

type Output = T

source§

fn try_read_line( &self, read_args: TryReadArgs<Self::Output> ) -> BoxResult<Self::Output>

source§

impl<T: Display + Clone + PartialEq> TryRead for Vec<T>

§

type Output = T

source§

fn try_read_line( &self, read_args: TryReadArgs<Self::Output> ) -> BoxResult<Self::Output>

source§

impl<T: Display + Clone + PartialEq, const LEN: usize> TryRead for &[T; LEN]

§

type Output = T

source§

fn try_read_line( &self, read_args: TryReadArgs<Self::Output> ) -> BoxResult<Self::Output>

source§

impl<T: Display + FromStr + PartialOrd<T>> TryRead for Range<T>

§

type Output = T

source§

fn try_read_line( &self, read_args: TryReadArgs<Self::Output> ) -> BoxResult<Self::Output>

source§

impl<T: Display + FromStr + PartialOrd<T>> TryRead for RangeFrom<T>

§

type Output = T

source§

fn try_read_line( &self, read_args: TryReadArgs<Self::Output> ) -> BoxResult<Self::Output>

source§

impl<T: Display + FromStr + PartialOrd<T>> TryRead for RangeInclusive<T>

§

type Output = T

source§

fn try_read_line( &self, read_args: TryReadArgs<Self::Output> ) -> BoxResult<Self::Output>

source§

impl<T: Display + FromStr + PartialOrd<T>> TryRead for RangeTo<T>

§

type Output = T

source§

fn try_read_line( &self, read_args: TryReadArgs<Self::Output> ) -> BoxResult<Self::Output>

source§

impl<T: Display + FromStr + PartialOrd<T>> TryRead for RangeToInclusive<T>

§

type Output = T

source§

fn try_read_line( &self, read_args: TryReadArgs<Self::Output> ) -> BoxResult<Self::Output>

Implementors§

source§

impl TryRead for BoolInput

§

type Output = bool

source§

impl TryRead for CharInput

§

type Output = char

source§

impl TryRead for F32Input

§

type Output = f32

source§

impl TryRead for F64Input

§

type Output = f64

source§

impl TryRead for I8Input

§

type Output = i8

source§

impl TryRead for I16Input

§

type Output = i16

source§

impl TryRead for I32Input

§

type Output = i32

source§

impl TryRead for I64Input

§

type Output = i64

source§

impl TryRead for I128Input

§

type Output = i128

source§

impl TryRead for IsizeInput

source§

impl TryRead for NonEmptyInput

source§

impl TryRead for NonWhitespaceInput

source§

impl TryRead for U8Input

§

type Output = u8

source§

impl TryRead for U16Input

§

type Output = u16

source§

impl TryRead for U32Input

§

type Output = u32

source§

impl TryRead for U64Input

§

type Output = u64

source§

impl TryRead for U128Input

§

type Output = u128

source§

impl TryRead for UsizeInput

source§

impl TryRead for YesNoInput

§

type Output = bool

source§

impl<T: Display + Clone + PartialEq> TryRead for EnumerateInput<&[T]>

§

type Output = (usize, T)

source§

impl<T: Display + Clone + PartialEq> TryRead for EnumerateInput<LinkedList<T>>

§

type Output = (usize, T)

source§

impl<T: Display + Clone + PartialEq> TryRead for EnumerateInput<VecDeque<T>>

§

type Output = (usize, T)

source§

impl<T: Display + Clone + PartialEq> TryRead for EnumerateInput<Vec<T>>

§

type Output = (usize, T)

source§

impl<T: Display + Clone + PartialEq, const LEN: usize> TryRead for EnumerateInput<&[T; LEN]>

§

type Output = (usize, T)

source§

impl<T: Fn(&str) -> Result<(), String>> TryRead for T

Allows you to keep reading until condition is met