Trait ParseLibrary

Source
pub trait ParseLibrary: XNode {
    const LIBRARY: &'static str;

    // Required methods
    fn extract_element(e: &LibraryElement) -> Option<&Library<Self>>;
    fn mk_element(lib: Library<Self>) -> LibraryElement;
}
Expand description

A trait for nodes that can be placed in a library element.

Required Associated Constants§

Source

const LIBRARY: &'static str

The name of the library element. For example, the Geometry element has LIBRARY = "library_geometries", and the corresponding library type is Library<Geometry>.

Required Methods§

Source

fn extract_element(e: &LibraryElement) -> Option<&Library<Self>>

Extract the library from a single LibraryElement.

Source

fn mk_element(lib: Library<Self>) -> LibraryElement

Make a LibraryElement from a Library.

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.

Implementors§

Source§

impl ParseLibrary for Animation

Source§

const LIBRARY: &'static str = "library_animations"

Source§

impl ParseLibrary for AnimationClip

Source§

const LIBRARY: &'static str = "library_animation_clips"

Source§

impl ParseLibrary for Camera

Source§

const LIBRARY: &'static str = "library_cameras"

Source§

impl ParseLibrary for Controller

Source§

const LIBRARY: &'static str = "library_controllers"

Source§

impl ParseLibrary for Effect

Source§

const LIBRARY: &'static str = "library_effects"

Source§

impl ParseLibrary for ForceField

Source§

const LIBRARY: &'static str = "library_force_fields"

Source§

impl ParseLibrary for Geometry

Source§

const LIBRARY: &'static str = "library_geometries"

Source§

impl ParseLibrary for Image

Source§

const LIBRARY: &'static str = "library_images"

Source§

impl ParseLibrary for Light

Source§

const LIBRARY: &'static str = "library_lights"

Source§

impl ParseLibrary for Material

Source§

const LIBRARY: &'static str = "library_materials"

Source§

impl ParseLibrary for Node

Source§

const LIBRARY: &'static str = "library_nodes"

Source§

impl ParseLibrary for PhysicsMaterial

Source§

const LIBRARY: &'static str = "library_physics_materials"

Source§

impl ParseLibrary for PhysicsModel

Source§

const LIBRARY: &'static str = "library_physics_models"

Source§

impl ParseLibrary for PhysicsScene

Source§

const LIBRARY: &'static str = "library_physics_scenes"

Source§

impl ParseLibrary for VisualScene

Source§

const LIBRARY: &'static str = "library_visual_scenes"