pub struct EntityExpectation {
pub entity: EntityKind,
pub presence: EntityPresence,
}Expand description
A declaration about how many rows an entity type must have.
Fields§
§entity: EntityKindThe entity kind this expectation covers.
presence: EntityPresenceWhether at least one row is required.
Implementations§
Source§impl EntityExpectation
impl EntityExpectation
Sourcepub fn new(entity: EntityKind, presence: EntityPresence) -> Self
pub fn new(entity: EntityKind, presence: EntityPresence) -> Self
Declare that an entity type must (or must not) have rows.
Trait Implementations§
Source§impl Clone for EntityExpectation
impl Clone for EntityExpectation
Source§impl Debug for EntityExpectation
impl Debug for EntityExpectation
Source§impl<'de> Deserialize<'de> for EntityExpectation
impl<'de> Deserialize<'de> for EntityExpectation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for EntityExpectation
Source§impl PartialEq for EntityExpectation
impl PartialEq for EntityExpectation
Source§impl Serialize for EntityExpectation
impl Serialize for EntityExpectation
impl StructuralPartialEq for EntityExpectation
Auto Trait Implementations§
impl Freeze for EntityExpectation
impl RefUnwindSafe for EntityExpectation
impl Send for EntityExpectation
impl Sync for EntityExpectation
impl Unpin for EntityExpectation
impl UnsafeUnpin for EntityExpectation
impl UnwindSafe for EntityExpectation
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