Trait safecast::CastInto

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

Trait for defining a cast operation to some destination type T. Analogous to 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§