var searchIndex = {}; searchIndex["cassowary"] = {"doc":"This crate contains an implementation of the Cassowary constraint solving algorithm, based upon the work by\nG.J. Badros et al. in 2001. This algorithm is designed primarily for use constraining elements in user interfaces.\nConstraints are linear combinations of the problem variables. The notable features of Cassowary that make it\nideal for user interfaces are that it is incremental (i.e. you can add and remove constraints at runtime\nand it will perform the minimum work to update the result) and that the constraints can be violated if\nnecessary,\nwith the order in which they are violated specified by setting a "strength" for each constraint.\nThis allows the solution to gracefully degrade, which is useful for when a\nuser interface needs to compromise on its constraints in order to still be able to display something.","items":[[3,"Variable","cassowary","Identifies a variable for the constraint solver.\nEach new variable is unique in the view of the solver, but copying or cloning the variable produces\na copy of the same variable.",null,null],[3,"Term","","A variable and a coefficient to multiply that variable by. This is a sub-expression in\na constraint equation.",null,null],[12,"variable","","",0,null],[12,"coefficient","","",0,null],[3,"Expression","","An expression that can be the left hand or right hand side of a constraint equation.\nIt is a linear combination of variables, i.e. a sum of variables weighted by coefficients, plus an optional constant.",null,null],[12,"terms","","",1,null],[12,"constant","","",1,null],[3,"Constraint","","A constraint, consisting of an equation goverened by an expression and a relational operator,\nand an associated strength.",null,null],[3,"PartialConstraint","","This is an intermediate type used in the syntactic sugar for specifying constraints. You should not use it\ndirectly.",null,null],[3,"Solver","","A constraint solver using the Cassowary algorithm. For proper usage please see the top level crate documentation.",null,null],[4,"RelationalOperator","","The possible relations that a constraint can specify.",null,null],[13,"LessOrEqual","","`<=`",2,null],[13,"Equal","","`==`",2,null],[13,"GreaterOrEqual","","`>=`",2,null],[4,"WeightedRelation","","This is part of the syntactic sugar used for specifying constraints. This enum should be used as part of a\nconstraint expression. See the module documentation for more information.",null,null],[13,"EQ","","`==`",3,null],[13,"LE","","`<=`",3,null],[13,"GE","","`>=`",3,null],[4,"AddConstraintError","","The possible error conditions that `Solver::add_constraint` can fail with.",null,null],[13,"DuplicateConstraint","","The constraint specified has already been added to the solver.",4,null],[13,"UnsatisfiableConstraint","","The constraint is required, but it is unsatisfiable in conjunction with the existing constraints.",4,null],[13,"InternalSolverError","","The solver entered an invalid state. If this occurs please report the issue. This variant specifies\nadditional details as a string.",4,null],[4,"RemoveConstraintError","","The possible error conditions that `Solver::remove_constraint` can fail with.",null,null],[13,"UnknownConstraint","","The constraint specified was not already in the solver, so cannot be removed.",5,null],[13,"InternalSolverError","","The solver entered an invalid state. If this occurs please report the issue. This variant specifies\nadditional details as a string.",5,null],[4,"AddEditVariableError","","The possible error conditions that `Solver::add_edit_variable` can fail with.",null,null],[13,"DuplicateEditVariable","","The specified variable is already marked as an edit variable in the solver.",6,null],[13,"BadRequiredStrength","","The specified strength was `REQUIRED`. This is illegal for edit variable strengths.",6,null],[4,"RemoveEditVariableError","","The possible error conditions that `Solver::remove_edit_variable` can fail with.",null,null],[13,"UnknownEditVariable","","The specified variable was not an edit variable in the solver, so cannot be removed.",7,null],[13,"InternalSolverError","","The solver entered an invalid state. If this occurs please report the issue. This variant specifies\nadditional details as a string.",7,null],[4,"SuggestValueError","","The possible error conditions that `Solver::suggest_value` can fail with.",null,null],[13,"UnknownEditVariable","","The specified variable was not an edit variable in the solver, so cannot have its value suggested.",8,null],[13,"InternalSolverError","","The solver entered an invalid state. If this occurs please report the issue. This variant specifies\nadditional details as a string.",8,null],[11,"new","","Construct a new solver.",9,{"inputs":[],"output":{"name":"solver"}}],[11,"add_constraints","","",9,null],[11,"add_constraint","","Add a constraint to the solver.",9,null],[11,"remove_constraint","","Remove a constraint from the solver.",9,null],[11,"has_constraint","","Test whether a constraint has been added to the solver.",9,null],[11,"add_edit_variable","","Add an edit variable to the solver.",9,null],[11,"remove_edit_variable","","Remove an edit variable from the solver.",9,null],[11,"has_edit_variable","","Test whether an edit variable has been added to the solver.",9,null],[11,"suggest_value","","Suggest a value for the given edit variable.",9,null],[11,"fetch_changes","","Fetches all changes to the values of variables since the last call to this function.",9,null],[11,"reset","","Reset the solver to the empty starting condition.",9,null],[11,"bitor","","",10,null],[11,"bitor","","",0,null],[11,"bitor","","",1,null],[11,"bitor","","",11,null],[11,"bitor","","",11,null],[11,"bitor","","",11,null],[11,"bitor","","",11,null],[11,"add","","",10,null],[11,"add","","",10,null],[11,"add","","",10,null],[11,"add","","",0,null],[11,"add","","",10,null],[11,"add","","",1,null],[11,"neg","","",10,null],[11,"sub","","",10,null],[11,"sub","","",10,null],[11,"sub","","",10,null],[11,"sub","","",0,null],[11,"sub","","",10,null],[11,"sub","","",1,null],[11,"mul","","",10,null],[11,"div","","",10,null],[11,"mul","","",0,null],[11,"div","","",0,null],[11,"add","","",0,null],[11,"add","","",0,null],[11,"add","","",0,null],[11,"add","","",1,null],[11,"neg","","",0,null],[11,"sub","","",0,null],[11,"sub","","",0,null],[11,"sub","","",0,null],[11,"sub","","",1,null],[11,"mul","","",1,null],[11,"div","","",1,null],[11,"add","","",1,null],[11,"add","","",1,null],[11,"neg","","",1,null],[11,"sub","","",1,null],[11,"sub","","",1,null],[0,"strength","","Contains useful constants and functions for producing strengths for use in the constraint solver.\nEach constraint added to the solver has an associated strength specifying the precedence the solver should\nimpose when choosing which constraints to enforce. It will try to enforce all constraints, but if that\nis impossible the lowest strength constraints are the first to be violated.",null,null],[5,"create","cassowary::strength","Create a constraint as a linear combination of STRONG, MEDIUM and WEAK strengths, corresponding to `a`\n`b` and `c` respectively. The result is further multiplied by `w`.",null,{"inputs":[{"name":"f64"},{"name":"f64"},{"name":"f64"},{"name":"f64"}],"output":{"name":"f64"}}],[5,"clip","","Clips a strength value to the legal range",null,{"inputs":[{"name":"f64"}],"output":{"name":"f64"}}],[17,"REQUIRED","","",null,null],[17,"STRONG","","",null,null],[17,"MEDIUM","","",null,null],[17,"WEAK","","",null,null],[11,"fmt","cassowary","",10,null],[11,"cmp","","",10,null],[11,"partial_cmp","","",10,null],[11,"lt","","",10,null],[11,"le","","",10,null],[11,"gt","","",10,null],[11,"ge","","",10,null],[11,"eq","","",10,null],[11,"ne","","",10,null],[11,"hash","","",10,null],[11,"clone","","",10,null],[11,"new","","Produces a new unique variable for use in constraint solving.",10,{"inputs":[],"output":{"name":"variable"}}],[11,"fmt","","",0,null],[11,"clone","","",0,null],[11,"fmt","","",1,null],[11,"clone","","",1,null],[11,"from_constant","","Constructs an expression of the form _n_, where n is a constant real number, not a variable.",1,{"inputs":[{"name":"f64"}],"output":{"name":"expression"}}],[11,"from_term","","Constructs an expression from a single term. Forms an expression of the form _n x_\nwhere n is the coefficient, and x is the variable.",1,{"inputs":[{"name":"term"}],"output":{"name":"expression"}}],[11,"new","","General constructor. Each `Term` in `terms` is part of the sum forming the expression, as well as `constant`.",1,{"inputs":[{"name":"vec"},{"name":"f64"}],"output":{"name":"expression"}}],[11,"negate","","Mutates this expression by multiplying it by minus one.",1,null],[11,"from","","",1,{"inputs":[{"name":"f64"}],"output":{"name":"expression"}}],[11,"from","","",1,{"inputs":[{"name":"variable"}],"output":{"name":"expression"}}],[11,"from","","",1,{"inputs":[{"name":"term"}],"output":{"name":"expression"}}],[11,"fmt","","",2,null],[11,"cmp","","",2,null],[11,"partial_cmp","","",2,null],[11,"hash","","",2,null],[11,"eq","","",2,null],[11,"clone","","",2,null],[11,"fmt","","",12,null],[11,"clone","","",12,null],[11,"new","","Construct a new constraint from an expression, a relational operator and a strength.\nThis corresponds to the equation `e op 0.0`, e.g. `x + y >= 0.0`. For equations with a non-zero\nright hand side, subtract it from the equation to give a zero right hand side.",12,{"inputs":[{"name":"expression"},{"name":"relationaloperator"},{"name":"f64"}],"output":{"name":"constraint"}}],[11,"expr","","The expression of the left hand side of the constraint equation.",12,null],[11,"op","","The relational operator governing the constraint.",12,null],[11,"strength","","The strength of the constraint that the solver will use.",12,null],[11,"hash","","",12,null],[11,"eq","","",12,null],[11,"clone","","",4,null],[11,"fmt","","",4,null],[11,"clone","","",5,null],[11,"fmt","","",5,null],[11,"clone","","",6,null],[11,"fmt","","",6,null],[11,"clone","","",7,null],[11,"fmt","","",7,null],[11,"clone","","",8,null],[11,"fmt","","",8,null]],"paths":[[3,"Term"],[3,"Expression"],[4,"RelationalOperator"],[4,"WeightedRelation"],[4,"AddConstraintError"],[4,"RemoveConstraintError"],[4,"AddEditVariableError"],[4,"RemoveEditVariableError"],[4,"SuggestValueError"],[3,"Solver"],[3,"Variable"],[3,"PartialConstraint"],[3,"Constraint"]]}; initSearch(searchIndex);