Struct zng_app::widget::builder::PropertyInfo
source · pub struct PropertyInfo {
pub group: NestGroup,
pub capture: bool,
pub id: PropertyId,
pub name: &'static str,
pub location: SourceLocation,
pub default: Option<fn() -> Box<dyn PropertyArgs>>,
pub new: fn(_: PropertyNewArgs) -> Box<dyn PropertyArgs>,
pub inputs: Box<[PropertyInput]>,
}
Expand description
Property info.
You can use the property_info!
macro to retrieve a property’s info.
Fields§
§group: NestGroup
Property nest position group.
capture: bool
Property is “capture-only”, no standalone implementation is provided, instantiating does not add a node, just returns the child.
Note that all properties can be captured, but if this is false
they provide an implementation that works standalone.
id: PropertyId
Unique ID that identifies the property implementation.
name: &'static str
Property name.
location: SourceLocation
Property declaration location.
default: Option<fn() -> Box<dyn PropertyArgs>>
New default property args.
This is Some(_)
only if the #[property(_, default(..))]
was set in the property declaration.
new: fn(_: PropertyNewArgs) -> Box<dyn PropertyArgs>
New property args from dynamically typed args.
§Instance
This function outputs property args, not a property node instance.
You can use PropertyArgs::instantiate
on the output to generate a property node from the args. If the
property is known at compile time you can use property_args!
to generate args instead, and you can just
call the property function directly to instantiate a node.
inputs: Box<[PropertyInput]>
Property inputs info.
Implementations§
source§impl PropertyInfo
impl PropertyInfo
Trait Implementations§
source§impl Clone for PropertyInfo
impl Clone for PropertyInfo
source§fn clone(&self) -> PropertyInfo
fn clone(&self) -> PropertyInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for PropertyInfo
impl RefUnwindSafe for PropertyInfo
impl Send for PropertyInfo
impl Sync for PropertyInfo
impl Unpin for PropertyInfo
impl UnwindSafe for PropertyInfo
Blanket Implementations§
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more