Trait safecast::CastInto[][src]

pub trait CastInto<T> {
    fn cast_into(self) -> T;
}
Expand description

Trait for defining a cast operation to some destination type T. Analogous to std::convert::Into. The inverse of CastFrom. Prefer implementing CastFrom over CastInto because implementing CastFrom automatically provides an implementation of CastInto.

Required methods

Cast an instance of Self into an instance of T.

Implementors