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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§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> 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