Trait easy_cast::Cast [−][src]
Two methods are provided:
Cast::castis for “success expected” conversions. In debug builds and when using thealways_assertfeature flag, inexact conversions will panic. In other cases, conversions may produce incorrect values (according to the behaviour ofas). This is similar to the behviour of Rust’s overflow checks on integer arithmetic, and intended for usage when the user is “reasonably sure” that conversion will succeed.Cast::try_castis for fallible conversions, and always produces an error if the conversion would be inexact.
Required methods
fn cast(self) -> T[src]
Cast from Self to T
fn try_cast(self) -> Result<T, Error>[src]
Try converting from Self to T