pub struct ObjectTemplate { /* private fields */ }Expand description
A template for creating custom objects: each build creates a new object
from the content.
Implementations§
Source§impl ObjectTemplate
impl ObjectTemplate
Sourcepub fn content(&self) -> Option<BoxedValue>
pub fn content(&self) -> Option<BoxedValue>
Gets or sets the content of the template: deferred content built on each
build.
pub fn set_content(&self, value: Option<BoxedValue>)
Sourcepub fn build(&self) -> Option<BoxedValue>
pub fn build(&self) -> Option<BoxedValue>
Trait Implementations§
Source§impl Default for ObjectTemplate
impl Default for ObjectTemplate
Source§impl ITemplate for ObjectTemplate
impl ITemplate for ObjectTemplate
Source§fn build(&self) -> BoxedValue
fn build(&self) -> BoxedValue
Builds the object from the template, as an untyped value.
Source§impl MarkupTyped for ObjectTemplate
impl MarkupTyped for ObjectTemplate
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
The markup metadata of the type.
Auto Trait Implementations§
impl !Freeze for ObjectTemplate
impl !RefUnwindSafe for ObjectTemplate
impl !Send for ObjectTemplate
impl !Sync for ObjectTemplate
impl !UnwindSafe for ObjectTemplate
impl Unpin for ObjectTemplate
impl UnsafeUnpin for ObjectTemplate
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more