pub enum Legality {
Legal,
Dynamic(LegalityCheck),
Covered(fn(&World, Entity) -> bool),
Illegal,
}Expand description
What a target does with one component name. A name it gives no rule is not written: kept and reported in
Mode::Partial, refused in Mode::Full. A writer’s target never carries a name through untouched: it writes its
format’s meaning and reports the rest (CONTRIBUTING.md, law 4).
Variants§
Legal
The writer writes it.
Dynamic(LegalityCheck)
Legal for the entities the predicate accepts; the others must be lowered.
Covered(fn(&World, Entity) -> bool)
Written through another component: legal on the entities the check accepts (a core.light with the
destination’s light it was raised to); on the rest as an unlisted name (kept and reported as not written in
Mode::Partial, illegal in Mode::Full). See Target::covered.
Illegal
Must be lowered before writing.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Legality
impl !UnwindSafe for Legality
impl Forget for Legality
impl Freeze for Legality
impl Send for Legality
impl Sync for Legality
impl Unpin for Legality
impl UnsafeUnpin for Legality
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