Skip to main content

Module prelude

Module prelude 

Source
Expand description

The refining-core prelude.

Macros§

and
Given two or more predicates, composes them together with And.
not
Negates the given predicate.
or
Given two or more predicates, composes them together with Or.
type_str
Lifts static strings to type-level strings.
xor
Given two or more predicates, composes them together with Xor.

Structs§

And
Represents predicates that are satisfied when both P and Q are satisfied.
Error
Represents errors that occur when the value of type T does not satisfy the predicate P.
False
Represents predicates that are never satisfied.
NoContext
Represents the absence of context.
Or
Represents predicates that are satisfied whenever at least P or Q are satisfied.
Refinement
Represents refinement types.
True
Represents predicates that are always satisfied.
Xor
Represents predicates that are satisfied whenever P or Q (but not both) are satisfied.

Traits§

Check
Extends any type T to check whether values satisfy given Predicate<T>.
Predicate
Represents predicates over values of type T.
PredicateExpected
Extends values P implementing Predicate<T> to return Expected<T, P> for formatting.
Refine
Extends any type T to allow refining its values with R implementing Refining<Value = T>.
Refining
Refinement methods.
TypeStr
Represents type-level strings.

Type Aliases§

Nand
Represents Not<And<P, Q>>.
Nor
Represents Not<Or<P, Q>>.
Recoverable
Represents recoverable results.
RecoverableRef
Represents recoverable reference results.
RecoverableRefinement
Represents recoverable refining results.
RecoverableRefinementRef
Represents recoverable reference refining results.
StaticStr
Represents static strings (as in the VALUE of TypeStr).
Xnor
Represents Not<Xor<P, Q>>.