pub struct AllDefs { /* private fields */ }
Expand description
Holds the sets of all entity type, common type, and action definitions (fully-qualified names) in all fragments.
Implementations§
Source§impl AllDefs
impl AllDefs
Sourcepub fn new<'a, N: 'a, A: 'a, I>(fragments: impl Fn() -> I) -> Selfwhere
I: Iterator<Item = &'a ValidatorSchemaFragment<N, A>>,
pub fn new<'a, N: 'a, A: 'a, I>(fragments: impl Fn() -> I) -> Selfwhere
I: Iterator<Item = &'a ValidatorSchemaFragment<N, A>>,
Build the sets of all entity type, common type, and action definitions (fully-qualified names) in all fragments.
Sourcepub fn single_fragment<N, A>(fragment: &ValidatorSchemaFragment<N, A>) -> Self
pub fn single_fragment<N, A>(fragment: &ValidatorSchemaFragment<N, A>) -> Self
Build an AllDefs
assuming that the given fragment is the only
fragment that exists.
Any names referring to definitions in other fragments will not resolve
properly.
Sourcepub fn is_defined_as_entity(&self, name: &InternalName) -> bool
pub fn is_defined_as_entity(&self, name: &InternalName) -> bool
Is the given (fully-qualified) InternalName
defined as an entity
type in any fragment?
Sourcepub fn is_defined_as_common(&self, name: &InternalName) -> bool
pub fn is_defined_as_common(&self, name: &InternalName) -> bool
Is the given (fully-qualified) InternalName
defined as a common type
in any fragment?
Sourcepub fn is_defined_as_action(&self, euid: &EntityUID) -> bool
pub fn is_defined_as_action(&self, euid: &EntityUID) -> bool
Is the given (fully-qualified) EntityUID
defined as an action in any
fragment?
Sourcepub fn mark_as_defined_as_common_type(&mut self, name: InternalName)
pub fn mark_as_defined_as_common_type(&mut self, name: InternalName)
Mark the given InternalName
as defined as a common type
Sourcepub fn rfc_70_shadowing_checks(&self) -> Result<()>
pub fn rfc_70_shadowing_checks(&self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AllDefs
impl RefUnwindSafe for AllDefs
impl Send for AllDefs
impl Sync for AllDefs
impl Unpin for AllDefs
impl UnwindSafe for AllDefs
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
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>
Converts
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>
Converts
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