[][src]Struct read_input::InputBuilderOnce

pub struct InputBuilderOnce<T: FromStr> { /* fields omitted */ }

'builder' used to store the settings that are used to fetch input.

.get() method takes ownership of the settings so can be called only once without cloning.

This type has support for default input value.

Methods

impl<T: FromStr> InputBuilderOnce<T>[src]

pub fn get(self) -> T[src]

'gets' the input form the user.

Panics if unable to read input line.

pub fn try_get(self) -> Result<T>[src]

'gets' the input form the user.

Errors

Returns Err if unable to read input line.

Trait Implementations

impl<T> Clone for InputBuilderOnce<T> where
    T: Clone + FromStr
[src]

impl<T: FromStr> InputBuild<T> for InputBuilderOnce<T>[src]

impl<T: FromStr + PartialOrd + 'static> InputConstraints<T> for InputBuilderOnce<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for InputBuilderOnce<T>

impl<T> !Send for InputBuilderOnce<T>

impl<T> !Sync for InputBuilderOnce<T>

impl<T> Unpin for InputBuilderOnce<T> where
    T: Unpin

impl<T> !UnwindSafe for InputBuilderOnce<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.