pub struct AllEqualTypeConstraint { /* private fields */ }Expand description
A type constraint that requires all or some arguments to have the same type.
See the with_all_arguments_sort, with_exact_length, and with_output_sort methods
for configuring the constraint.
Implementations§
Source§impl AllEqualTypeConstraint
impl AllEqualTypeConstraint
Sourcepub fn new(name: &str, span: Span) -> AllEqualTypeConstraint
pub fn new(name: &str, span: Span) -> AllEqualTypeConstraint
Creates the AllEqualTypeConstraint.
Sourcepub fn into_box(self) -> Box<dyn TypeConstraint>
pub fn into_box(self) -> Box<dyn TypeConstraint>
Converts self into a boxed type constraint.
Sourcepub fn with_all_arguments_sort(self, sort: ArcSort) -> Self
pub fn with_all_arguments_sort(self, sort: ArcSort) -> Self
Requires all arguments to have the given sort.
If with_output_sort is not specified, this requirement
also applies to the output argument.
Sourcepub fn with_exact_length(self, exact_length: usize) -> Self
pub fn with_exact_length(self, exact_length: usize) -> Self
Requires the length of arguments to be exact_length.
Note this includes both input arguments and output argument.
Sourcepub fn with_output_sort(self, output_sort: ArcSort) -> Self
pub fn with_output_sort(self, output_sort: ArcSort) -> Self
Requires the output argument to have the given sort.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AllEqualTypeConstraint
impl !RefUnwindSafe for AllEqualTypeConstraint
impl Send for AllEqualTypeConstraint
impl Sync for AllEqualTypeConstraint
impl Unpin for AllEqualTypeConstraint
impl !UnwindSafe for AllEqualTypeConstraint
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more