pub struct PropertyInfo {
pub group: NestGroup,
pub build_action: 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]>,
/* private fields */
}Expand description
Property info.
You can use the property_info! macro to retrieve a property’s info.
Fields§
§group: NestGroupProperty nest position group.
build_action: boolProperty modifies the widget builder, like a widget build action.
No standalone implementation is provided, instantiating does not add a node, just logs an error and returns the child.
id: PropertyIdUnique ID that identifies the property implementation.
name: &'static strProperty name.
location: SourceLocationProperty 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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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