Struct Shl

Source
pub struct Shl;
Expand description

A Binary operation that will concurrently resolve two Futures and shl their results.

§Example

use futures_executor::block_on;
use async_ops::Shl;

let a = async { 42 };
let b = async { 2 };

let result = async {
  async_ops::on(a).op(Shl, b).await
};

assert_eq!(std::ops::Shl::shl(42, 2), block_on(result));

Trait Implementations§

Source§

impl<Lhs: Future, Rhs: Future> Binary<Lhs, Rhs> for Shl
where Lhs::Output: Shl<Rhs::Output>,

Source§

type Output = AsyncShl<Lhs, Rhs>

The resulting type after applying the binary operation.
Source§

fn op(lhs: Lhs, rhs: Rhs) -> Self::Output

Do the binary operation on given operands.
Source§

fn op_assign(lhs: &mut Lhs, rhs: Rhs)
where Lhs: Assignable<Self::Output>,

Do the binary operation on given operands and assign the result to the lhs operand.

Auto Trait Implementations§

§

impl Freeze for Shl

§

impl RefUnwindSafe for Shl

§

impl Send for Shl

§

impl Sync for Shl

§

impl Unpin for Shl

§

impl UnwindSafe for Shl

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.