pub struct Set {
pub id: SetId,
pub name: String,
pub expr: SetExpr,
}
Fields§
§id: SetId
§name: String
§expr: SetExpr
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Set
impl<'de> Deserialize<'de> for Set
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
Source§impl LedgerItem for Set
impl LedgerItem for Set
type Error = ()
type Key = Uuid
Source§type Modifier = SetAction
type Modifier = SetAction
The type that is responsible for mutating the item and thus create a new genreation
Source§type PropertyType = String
type PropertyType = String
Cache regarding property of a card so you get like all the cards that have a certain value or whatever
fn new_default(id: Self::Key) -> Self
fn item_id(&self) -> Self::Key
fn verify(self, ledger: &Ledger<Self>) -> Result<Self, EventError<Self>>
Source§fn run_event(
self,
event: Self::Modifier,
ledger: &Ledger<Self>,
verify: bool,
) -> Result<Self, EventError<Self>>
fn run_event( self, event: Self::Modifier, ledger: &Ledger<Self>, verify: bool, ) -> Result<Self, EventError<Self>>
Modifies
Self
and checks for cycles and invariants.fn find_cycle( &self, ledger: &LedgerType<Self>, ) -> Option<Vec<(Self::Key, Self::RefType)>>
Source§fn validate(&self, ledger: &LedgerType<Self>) -> Result<(), Self::Error>
fn validate(&self, ledger: &LedgerType<Self>) -> Result<(), Self::Error>
Assertions that should hold true. Like invariants with other cards that it references.
called by run_event, if it returns error after an event is run, the event is not applied.
Source§fn ref_cache(&self) -> HashSet<ItemReference<Self>>
fn ref_cache(&self) -> HashSet<ItemReference<Self>>
List of references to other items, along with the name of the type of reference. Read more
fn dependencies(&self) -> HashSet<Self::Key>
fn recursive_dependent_ids(
&self,
ledger: &LedgerType<Self>,
) -> HashSet<Self::Key>where
Self: Sized,
fn recursive_dependents(&self, ledger: &LedgerType<Self>) -> HashSet<Self>where
Self: Sized,
fn dependents(&self, ledger: &LedgerType<Self>) -> HashSet<Self::Key>
Source§fn properties_cache(
&self,
ledger: &Ledger<Self>,
) -> HashSet<PropertyCache<Self>>where
Self: LedgerItem,
fn properties_cache(
&self,
ledger: &Ledger<Self>,
) -> HashSet<PropertyCache<Self>>where
Self: LedgerItem,
List of defined properties that this item has. Read more
fn listed_cache( &self, ledger: &Ledger<Self>, ) -> HashMap<Either<PropertyCache<Self>, ItemRefCache<Self>>, HashSet<Self::Key>>
fn caches(
&self,
ledger: &Ledger<Self>,
) -> HashSet<(Either<PropertyCache<Self>, ItemRefCache<Self>>, Self::Key)>where
Self: LedgerItem,
impl Eq for Set
impl StructuralPartialEq for Set
Auto Trait Implementations§
impl Freeze for Set
impl RefUnwindSafe for Set
impl Send for Set
impl Sync for Set
impl Unpin for Set
impl UnwindSafe for Set
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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