pub struct CascadeMetadata { /* private fields */ }Expand description
Maps mutation names to the entity types they modify.
Built from compiled schema, this metadata enables determining which entities are affected by each mutation operation.
Implementations§
Source§impl CascadeMetadata
impl CascadeMetadata
Sourcepub fn new() -> Self
pub fn new() -> Self
Create empty cascade metadata.
Useful when building metadata programmatically or in tests.
Sourcepub fn add_mutation(&mut self, mutation_name: &str, entity_type: &str)
pub fn add_mutation(&mut self, mutation_name: &str, entity_type: &str)
Add a mutation-to-entity mapping.
§Arguments
mutation_name- Name of the mutation (e.g., “createUser”)entity_type- Type of entity it modifies (e.g., “User”)
Sourcepub fn get_entity_type(&self, mutation_name: &str) -> Option<&str>
pub fn get_entity_type(&self, mutation_name: &str) -> Option<&str>
Sourcepub fn get_mutations_for_entity(&self, entity_type: &str) -> Vec<String>
pub fn get_mutations_for_entity(&self, entity_type: &str) -> Vec<String>
Sourcepub fn contains_mutation(&self, mutation_name: &str) -> bool
pub fn contains_mutation(&self, mutation_name: &str) -> bool
Check if metadata contains a mutation.
Trait Implementations§
Source§impl Clone for CascadeMetadata
impl Clone for CascadeMetadata
Source§fn clone(&self) -> CascadeMetadata
fn clone(&self) -> CascadeMetadata
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 Debug for CascadeMetadata
impl Debug for CascadeMetadata
Auto Trait Implementations§
impl Freeze for CascadeMetadata
impl RefUnwindSafe for CascadeMetadata
impl Send for CascadeMetadata
impl Sync for CascadeMetadata
impl Unpin for CascadeMetadata
impl UnsafeUnpin for CascadeMetadata
impl UnwindSafe for CascadeMetadata
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