#[derive(Value)]
{
// Attributes available to this derive:
#[depends]
}
Expand description
Implement necessary traits for making this type a valid value in either
an InputNode
or DerivedNode
.
Hashing
By default, this will assume the type implements Hash
. If it doesn’t,
you must either mark a field you wish to use as a hash with
#[depends(hash)]
, or mark the type itself as #[depends(unhashable)]
.
Note that marking a node as
unhashable
will cause any node with an edge to it to consider its dependencies dirty on every resolve. In the vast majority of cases you should hash a field instead.
Cleaning
By default, this will implement a no-op Clean
implementation. This
means that nothing will be done to clean the node between resolves.
If you wish to implement Clean
manually, you can do so by using the
#[depends(custom_clean)]
attribute on the struct and providing your
implementation.
Any transient state (such as ‘the things which have changed since the last resolve’) must be cleared up in this method.