Struct sixtyfps_interpreter::ComponentDefinition[][src]

pub struct ComponentDefinition { /* fields omitted */ }

ComponentDefinition is a representation of a compiled component from .60 markup.

It can be constructed from a .60 file using the ComponentCompiler::build_from_path or ComponentCompiler::build_from_source functions. And then it can be instantiated with the Self::create function.

The ComponentDefinition acts as a factory to create new instances. When you’ve finished creating the instances it is safe to drop the ComponentDefinition.

Implementations

impl ComponentDefinition[src]

pub fn create(&self) -> ComponentInstance[src]

Creates a new instance of the component and returns a shared handle to it.

pub fn properties<'a>(
    &'a self
) -> impl Iterator<Item = (String, ValueType)> + 'a
[src]

List of publicly declared properties.

pub fn name(&self) -> &str[src]

The name of this Component as written in the .60 file

Trait Implementations

impl Clone for ComponentDefinition[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.