Struct ya_agreement_utils::Constraints
source · pub struct Constraints {
pub constraints: Vec<ConstraintExpr>,
pub operator: ClauseOperator,
}
Fields§
§constraints: Vec<ConstraintExpr>
§operator: ClauseOperator
Implementations§
source§impl Constraints
impl Constraints
pub fn new_clause<T: Into<ConstraintExpr>>( op: ClauseOperator, v: Vec<T> ) -> Constraints
pub fn new_single<T: Into<ConstraintExpr>>(el: T) -> Constraints
pub fn or(self, c: Constraints) -> Constraints
pub fn and(self, c: Constraints) -> Constraints
pub fn without<T: Into<ConstraintKey>>(self, removed_key: T) -> Constraints
pub fn filter_by_key<T: Into<ConstraintKey>>( &self, get_key: T ) -> Option<Constraints>
Trait Implementations§
source§impl Clone for Constraints
impl Clone for Constraints
source§fn clone(&self) -> Constraints
fn clone(&self) -> Constraints
Returns a copy 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 Display for Constraints
impl Display for Constraints
source§impl From<Constraints> for ConstraintExpr
impl From<Constraints> for ConstraintExpr
source§fn from(key: Constraints) -> Self
fn from(key: Constraints) -> Self
Converts to this type from the input type.
source§impl IntoIterator for Constraints
impl IntoIterator for Constraints
§type Item = ConstraintExpr
type Item = ConstraintExpr
The type of the elements being iterated over.
§type IntoIter = IntoIter<<Constraints as IntoIterator>::Item, Global>
type IntoIter = IntoIter<<Constraints as IntoIterator>::Item, Global>
Which kind of iterator are we turning this into?
Auto Trait Implementations§
impl RefUnwindSafe for Constraints
impl Send for Constraints
impl Sync for Constraints
impl Unpin for Constraints
impl UnwindSafe for Constraints
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