FromIn

Trait FromIn 

Source
pub trait FromIn<'a, T>: Sized {
    // Required method
    fn from_in(value: T, allocator: &'a Allocator) -> Self;
}
Expand description

This trait works similarly to the standard library From trait.

It comes with a similar implementation containing blanket implementation for IntoIn, reflective implementation and a bunch of primitive conversions from Rust types to their arena equivalent.

Required Methods§

Source

fn from_in(value: T, allocator: &'a Allocator) -> Self

Converts to this type from the input type within the given allocator.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a> FromIn<'a, String> for &'a str

Source§

fn from_in(value: String, allocator: &'a Allocator) -> Self

Source§

impl<'a, T> FromIn<'a, Option<T>> for Option<Box<'a, T>>

Source§

fn from_in(value: Option<T>, allocator: &'a Allocator) -> Self

Implementors§

Source§

impl<'a, T> FromIn<'a, T> for Box<'a, T>

Source§

impl<'a, T> FromIn<'a, T> for T

FromIn is reflective