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<'_, '_>, ) -> Option<Entity>

Source§

impl FromSchematicInput<ProtoEntity> for Entity

Source§

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

Source§

impl FromSchematicInput<ButtonBundle> for ButtonBundle

Source§

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

Source§

impl FromSchematicInput<ImageBundle> for ImageBundle

Source§

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

Source§

impl FromSchematicInput<Text2dBundle> for Text2dBundle

Source§

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

Source§

impl FromSchematicInput<TextBundle> for TextBundle

Source§

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

Source§

impl FromSchematicInput<EntityAccess> for Option<Entity>

Source§

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

Source§

impl FromSchematicInput<EntityAccess> for Entity

Source§

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

Source§

impl FromSchematicInput<ProtoEntityList> for Vec<Entity>

Source§

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

Source§

impl FromSchematicInput<EnvironmentMapLightInput> for EnvironmentMapLight

Source§

fn from_input( __input__: EnvironmentMapLightInput, __context__: &mut SchematicContext<'_, '_>, ) -> EnvironmentMapLight

Source§

impl FromSchematicInput<GlyphAtlasInfoInput> for GlyphAtlasInfo

Source§

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

Source§

impl FromSchematicInput<Mesh2dHandleInput> for Mesh2dHandle

Source§

fn from_input( __input__: Mesh2dHandleInput, __context__: &mut SchematicContext<'_, '_>, ) -> Mesh2dHandle

Source§

impl FromSchematicInput<PositionedGlyphInput> for PositionedGlyph

Source§

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

Source§

impl FromSchematicInput<SkinnedMeshInput> for SkinnedMesh

Source§

fn from_input( __input__: SkinnedMeshInput, __context__: &mut SchematicContext<'_, '_>, ) -> SkinnedMesh

Source§

impl FromSchematicInput<TextInput> for Text

Source§

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

Source§

impl FromSchematicInput<TextLayoutInfoInput> for TextLayoutInfo

Source§

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

Source§

impl FromSchematicInput<TextSectionInput> for TextSection

Source§

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

Source§

impl FromSchematicInput<TextStyleInput> for TextStyle

Source§

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

Source§

impl FromSchematicInput<UiImageInput> for UiImage

Source§

fn from_input( __input__: UiImageInput, __context__: &mut SchematicContext<'_, '_>, ) -> UiImage

Source§

impl<M: Material2d> FromSchematicInput<MaterialMesh2dBundle<M>> for MaterialMesh2dBundle<M>

Source§

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

Source§

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

Source§

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

Implementors§

Source§

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