pub struct ConstraintCatalog { /* private fields */ }Implementations§
Source§impl ConstraintCatalog
impl ConstraintCatalog
pub fn list(&self) -> Vec<ConstraintDefinition>
pub fn get(&self, name: &str) -> Option<&ConstraintDefinition>
pub fn contains_name(&self, name: &str) -> bool
pub fn constraint_owning_index( &self, index_name: &str, ) -> Option<&ConstraintDefinition>
Sourcepub fn iter(&self) -> impl Iterator<Item = &ConstraintDefinition>
pub fn iter(&self) -> impl Iterator<Item = &ConstraintDefinition>
Iterate the catalog in stored order. Useful for enforcement scans that need to know which constraints apply to a (label, prop) tuple.
Sourcepub fn find_equivalent(
&self,
request: &ConstraintRequest,
) -> Option<&ConstraintDefinition>
pub fn find_equivalent( &self, request: &ConstraintRequest, ) -> Option<&ConstraintDefinition>
Looks for an exact-shape match (same kind, entity, label, props,
and type for property-type constraints). Property order matters
— (a, b) and (b, a) are different constraints.
Sourcepub fn find_same_schema(
&self,
request: &ConstraintRequest,
) -> Option<&ConstraintDefinition>
pub fn find_same_schema( &self, request: &ConstraintRequest, ) -> Option<&ConstraintDefinition>
Looks for any constraint on the same (entity, label, properties) schema regardless of kind. Used for 22N66 conflict detection — e.g. uniqueness vs. node-key on the same schema.
pub fn try_create( &mut self, request: ConstraintRequest, if_not_exists: bool, ) -> Result<CreateConstraintOutcome, CreateConstraintError>
pub fn try_drop( &mut self, name: &str, if_exists: bool, ) -> Result<DropConstraintOutcome, DropConstraintError>
Trait Implementations§
Source§impl Clone for ConstraintCatalog
impl Clone for ConstraintCatalog
Source§fn clone(&self) -> ConstraintCatalog
fn clone(&self) -> ConstraintCatalog
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ConstraintCatalog
impl Debug for ConstraintCatalog
Source§impl Default for ConstraintCatalog
impl Default for ConstraintCatalog
Source§fn default() -> ConstraintCatalog
fn default() -> ConstraintCatalog
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConstraintCatalog
impl RefUnwindSafe for ConstraintCatalog
impl Send for ConstraintCatalog
impl Sync for ConstraintCatalog
impl Unpin for ConstraintCatalog
impl UnsafeUnpin for ConstraintCatalog
impl UnwindSafe for ConstraintCatalog
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