Trait FromSchematicInput

Source
pub trait FromSchematicInput<T> {
    // Required method
    fn from_input(input: T, context: &mut SchematicContext<'_, '_>) -> Self;
}
Expand description

A custom From-like trait used to convert the input of a schematic to itself.

This is used by derive macro to automatically handle the conversion.

This trait is has a blanket implementation for any type where the input type satisfies Into for the schematic type.

Required Methods§

Source

fn from_input(input: T, context: &mut SchematicContext<'_, '_>) -> Self

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 FromSchematicInput<ProtoEntity> for Option<Entity>

Source§

fn from_input( input: ProtoEntity, context: &mut SchematicContext<'_, '_>, ) -> Self

Source§

impl FromSchematicInput<ProtoEntity> for Entity

Source§

fn from_input( input: ProtoEntity, context: &mut SchematicContext<'_, '_>, ) -> Self

Source§

impl FromSchematicInput<EntityAccess> for Option<Entity>

Source§

fn from_input( input: EntityAccess, context: &mut SchematicContext<'_, '_>, ) -> Self

Source§

impl FromSchematicInput<EntityAccess> for Entity

Source§

fn from_input( input: EntityAccess, context: &mut SchematicContext<'_, '_>, ) -> Self

Source§

impl FromSchematicInput<ProtoEntityList> for Vec<Entity>

Source§

fn from_input( input: ProtoEntityList, context: &mut SchematicContext<'_, '_>, ) -> Self

Source§

impl<T: Asset> FromSchematicInput<ProtoAsset> for Handle<T>

Source§

fn from_input(input: ProtoAsset, context: &mut SchematicContext<'_, '_>) -> Self

Implementors§

Source§

impl<S, T: Into<S>> FromSchematicInput<T> for S