Trait tap::TryConv[][src]

pub trait TryConv where
    Self: Sized
{ fn try_conv<T>(self) -> Result<T, Self::Error>
    where
        Self: TryInto<T>,
        T: Sized
, { ... } }

Wraps TryInto::<T>::try_into as a method that can be placed in pipelines.

Provided methods

fn try_conv<T>(self) -> Result<T, Self::Error> where
    Self: TryInto<T>,
    T: Sized
[src]

Attempts to convert self into T using TryInto<T>.

Examples

use tap::conv::TryConv;

let len = "Saluton, mondo!"
  .try_conv::<String>()
  .unwrap()
  .len();
Loading content...

Implementors

impl<T> TryConv for T[src]

Loading content...