pub struct AttrCommandPickEntity {
pub name: String,
pub class_names: ClassNamesToRoll,
pub min: CardinalityValue,
pub max: CardinalityValue,
/* private fields */
}Expand description
Pick a collected entity by class name:
attribute % ClassNameor
[1..3 attribute] % ClassName- The class name can be a concrete or a base class
- Picked entities can be selected again, unlike used entities.
- If multiple entities are picked for an attribute, uniqueness is maintained.
Any selected entity can be ‘injected’ with new attributes or attribute overrides:
attribute ? ClassName {
new_attribute = "some value"
}Fields§
§name: String§class_names: ClassNamesToRoll§min: CardinalityValue§max: CardinalityValueTrait Implementations§
Source§impl AttrCommand for AttrCommandPickEntity
impl AttrCommand for AttrCommandPickEntity
fn apply( &self, ctx: &mut Context<'_>, builder: &SandboxBuilder<'_>, tx: &mut ReadWriteTransaction<'_>, euid: &str, ) -> Result<()>
fn revert( &self, ctx: &mut Context<'_>, builder: &SandboxBuilder<'_>, tx: &mut ReadWriteTransaction<'_>, euid: &str, ) -> Result<()>
fn value(&self) -> Option<String>
Source§impl Clone for AttrCommandPickEntity
impl Clone for AttrCommandPickEntity
Source§fn clone(&self) -> AttrCommandPickEntity
fn clone(&self) -> AttrCommandPickEntity
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl EntityAssigner for AttrCommandPickEntity
impl EntityAssigner for AttrCommandPickEntity
Source§fn new(
name: String,
class_names: ClassNamesToRoll,
min: CardinalityValue,
max: CardinalityValue,
injectors: Injectors,
) -> Self
fn new( name: String, class_names: ClassNamesToRoll, min: CardinalityValue, max: CardinalityValue, injectors: Injectors, ) -> Self
Constructs a new instance implementing the
EntityAssigner trait. Read moreAuto Trait Implementations§
impl Freeze for AttrCommandPickEntity
impl !RefUnwindSafe for AttrCommandPickEntity
impl Send for AttrCommandPickEntity
impl Sync for AttrCommandPickEntity
impl Unpin for AttrCommandPickEntity
impl !UnwindSafe for AttrCommandPickEntity
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
Mutably borrows from an owned value. Read more