pub struct AttrCommandUseEntity {
pub name: String,
pub class_names: ClassNamesToRoll,
pub min: CardinalityValue,
pub max: CardinalityValue,
/* private fields */
}Expand description
Use a collected entity by class name:
attribute ? ClassNameor
[1..3 attribute] ? ClassName- The class name can be a concrete or a base class
- The used entity will be made unavailable for others until it gets recycled
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 AttrCommandUseEntity
impl AttrCommand for AttrCommandUseEntity
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 AttrCommandUseEntity
impl Clone for AttrCommandUseEntity
Source§fn clone(&self) -> AttrCommandUseEntity
fn clone(&self) -> AttrCommandUseEntity
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 AttrCommandUseEntity
impl EntityAssigner for AttrCommandUseEntity
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 AttrCommandUseEntity
impl !RefUnwindSafe for AttrCommandUseEntity
impl Send for AttrCommandUseEntity
impl Sync for AttrCommandUseEntity
impl Unpin for AttrCommandUseEntity
impl !UnwindSafe for AttrCommandUseEntity
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