Trait bones_framework::prelude::piccolo::conversion::FromValue

pub trait FromValue<'gc>: Sized {
    // Required method
    fn from_value(
        ctx: Context<'gc>,
        value: Value<'gc>,
    ) -> Result<Self, TypeError>;
}

Required Methods§

fn from_value(ctx: Context<'gc>, value: Value<'gc>) -> Result<Self, TypeError>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl<'gc> FromValue<'gc> for bool

§

fn from_value(_: Context<'gc>, value: Value<'gc>) -> Result<bool, TypeError>

§

impl<'gc> FromValue<'gc> for f32

§

fn from_value(_: Context<'gc>, value: Value<'gc>) -> Result<f32, TypeError>

§

impl<'gc> FromValue<'gc> for f64

§

fn from_value(_: Context<'gc>, value: Value<'gc>) -> Result<f64, TypeError>

§

impl<'gc> FromValue<'gc> for i8

§

fn from_value(_: Context<'gc>, value: Value<'gc>) -> Result<i8, TypeError>

§

impl<'gc> FromValue<'gc> for i16

§

fn from_value(_: Context<'gc>, value: Value<'gc>) -> Result<i16, TypeError>

§

impl<'gc> FromValue<'gc> for i32

§

fn from_value(_: Context<'gc>, value: Value<'gc>) -> Result<i32, TypeError>

§

impl<'gc> FromValue<'gc> for i64

§

fn from_value(_: Context<'gc>, value: Value<'gc>) -> Result<i64, TypeError>

§

impl<'gc> FromValue<'gc> for u8

§

fn from_value(_: Context<'gc>, value: Value<'gc>) -> Result<u8, TypeError>

§

impl<'gc> FromValue<'gc> for u16

§

fn from_value(_: Context<'gc>, value: Value<'gc>) -> Result<u16, TypeError>

§

impl<'gc> FromValue<'gc> for u32

§

fn from_value(_: Context<'gc>, value: Value<'gc>) -> Result<u32, TypeError>

§

impl<'gc> FromValue<'gc> for u64

§

fn from_value(_: Context<'gc>, value: Value<'gc>) -> Result<u64, TypeError>

§

impl<'gc, T> FromValue<'gc> for Option<T>
where T: FromValue<'gc>,

§

fn from_value( ctx: Context<'gc>, value: Value<'gc>, ) -> Result<Option<T>, TypeError>

§

impl<'gc, T, const N: usize> FromValue<'gc> for [T; N]
where T: FromValue<'gc>,

§

fn from_value(ctx: Context<'gc>, value: Value<'gc>) -> Result<[T; N], TypeError>

Implementors§

source§

impl<'gc> FromValue<'gc> for &'gc EcsRef

source§

impl<'gc> FromValue<'gc> for &'gc WorldRef

§

impl<'gc> FromValue<'gc> for Function<'gc>

§

impl<'gc> FromValue<'gc> for Value<'gc>

§

impl<'gc> FromValue<'gc> for bones_framework::asset::prelude::bones_utils::prelude::alloc::string::String

§

impl<'gc> FromValue<'gc> for Callback<'gc>

§

impl<'gc> FromValue<'gc> for Closure<'gc>

§

impl<'gc> FromValue<'gc> for bones_framework::prelude::piccolo::String<'gc>

§

impl<'gc> FromValue<'gc> for Table<'gc>

§

impl<'gc> FromValue<'gc> for Thread<'gc>

§

impl<'gc> FromValue<'gc> for UserData<'gc>

§

impl<'gc, T> FromValue<'gc> for Vec<T>
where T: FromValue<'gc>,