Cast

Trait Cast 

Source
pub trait Cast<T = Self> {
    // Required method
    fn cast(&self) -> T;
}
Expand description

Unary operator for casting values of one type to another.

Required Methods§

Source

fn cast(&self) -> T

Casts the value of self into a value of type T.

This method checks that the cast does not lose any bits of information.

Implementors§

Source§

impl<E> Cast for Boolean<E>
where E: Environment,

Source§

impl<E> Cast for Field<E>
where E: Environment,

Source§

impl<E> Cast for Scalar<E>
where E: Environment,

Source§

impl<E> Cast<Address<E>> for Boolean<E>
where E: Environment,

Source§

impl<E> Cast<Address<E>> for Field<E>
where E: Environment,

Source§

impl<E> Cast<Address<E>> for Scalar<E>
where E: Environment,

Source§

impl<E> Cast<Boolean<E>> for Field<E>
where E: Environment,

Source§

impl<E> Cast<Boolean<E>> for Scalar<E>
where E: Environment,

Source§

impl<E> Cast<Field<E>> for Boolean<E>
where E: Environment,

Source§

impl<E> Cast<Field<E>> for Scalar<E>
where E: Environment,

Source§

impl<E> Cast<Group<E>> for Boolean<E>
where E: Environment,

Source§

impl<E> Cast<Group<E>> for Field<E>
where E: Environment,

Source§

impl<E> Cast<Group<E>> for Scalar<E>
where E: Environment,

Source§

impl<E> Cast<Scalar<E>> for Boolean<E>
where E: Environment,

Source§

impl<E> Cast<Scalar<E>> for Field<E>
where E: Environment,

Source§

impl<E, I0, I1> Cast<Integer<E, I1>> for Integer<E, I0>
where E: Environment, I0: IntegerType, I1: IntegerType,

Source§

impl<E, I> Cast<Integer<E, I>> for Boolean<E>
where E: Environment, I: IntegerType,

Source§

impl<E, I> Cast<Integer<E, I>> for Field<E>
where E: Environment, I: IntegerType,

Source§

impl<E, I> Cast<Integer<E, I>> for Scalar<E>
where E: Environment, I: IntegerType,

Source§

impl<E, I> Cast<Address<E>> for Integer<E, I>
where E: Environment, I: IntegerType,

Source§

impl<E, I> Cast<Boolean<E>> for Integer<E, I>
where E: Environment, I: IntegerType,

Source§

impl<E, I> Cast<Field<E>> for Integer<E, I>
where E: Environment, I: IntegerType,

Source§

impl<E, I> Cast<Group<E>> for Integer<E, I>
where E: Environment, I: IntegerType,

Source§

impl<E, I> Cast<Scalar<E>> for Integer<E, I>
where E: Environment, I: IntegerType,