Skip to main content

To

Trait To 

Source
pub trait To<T> {
    // Required method
    fn to(&self) -> T;
}
Expand description

A reference-to-value conversion.

Required Methods§

Source

fn to(&self) -> T

Converts this reference into the (usually inferred) input type.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, F: Into<T> + Copy> To<T> for F