Lines Matching refs:from
118 $crate::Right(err) => return $crate::Right(::core::convert::From::from(err)),
128 $crate::Left(err) => return $crate::Left(::core::convert::From::from(err)),
264 // guaranteed to be pinned, as they come from `self` which is pinned.
278 // to be pinned, as they come from `self` which is pinned, and we never
519 /// Returns left value or computes it from a closure
588 /// Returns right value or computes it from a closure
753 /// Factors out `None` from an `Either` of [`Option`].
774 /// Factors out a homogenous type from an `Either` of [`Result`].
797 /// Factors out a homogenous type from an `Either` of [`Result`].
820 /// Factor out a homogeneous type from an either of pairs.
841 /// Factor out a homogeneous type from an either of pairs.
899 /// Convert from `Result` to `Either` with `Ok => Right` and `Err => Left`.
901 fn from(r: Result<R, L>) -> Self {
909 /// Convert from `Either` to `Result` with `Right => Ok` and `Left => Err`.
1337 assert_eq!(b(), Left(String::from("foo bar")));
1345 let value: Either<String, &str> = Left(String::from("test"));