pub struct ShapePattern { /* private fields */ }👎Deprecated since 0.1.0:
Use bimm-contracts instead
Implementations§
Source§impl ShapePattern
impl ShapePattern
Sourcepub fn new(components: Vec<PatternComponent>) -> Result<Self, ShapePatternError>
👎Deprecated since 0.1.0: Use bimm-contracts instead
pub fn new(components: Vec<PatternComponent>) -> Result<Self, ShapePatternError>
Use bimm-contracts instead
Sourcepub fn parse(input: &str) -> Result<Self, ShapePatternError>
👎Deprecated since 0.1.0: Use bimm-contracts instead
pub fn parse(input: &str) -> Result<Self, ShapePatternError>
Use bimm-contracts instead
Sourcepub fn cached_parse(input: &str) -> Result<Self, ShapePatternError>
👎Deprecated since 0.1.0: Use bimm-contracts instead
pub fn cached_parse(input: &str) -> Result<Self, ShapePatternError>
Use bimm-contracts instead
Sourcepub fn components(&self) -> &[PatternComponent]
👎Deprecated since 0.1.0: Use bimm-contracts instead
pub fn components(&self) -> &[PatternComponent]
Use bimm-contracts instead
Get the components of the ShapePattern.
Sourcepub fn ellipsis_pos(&self) -> Option<usize>
👎Deprecated since 0.1.0: Use bimm-contracts instead
pub fn ellipsis_pos(&self) -> Option<usize>
Use bimm-contracts instead
Get the position of the ellipsis in the ShapePattern; if any.
Sourcepub fn has_ellipsis(&self) -> bool
👎Deprecated since 0.1.0: Use bimm-contracts instead
pub fn has_ellipsis(&self) -> bool
Use bimm-contracts instead
Check if the ShapePattern has an ellipsis.
Sourcepub fn match_bindings<B: ShapeBindingSource>(
&self,
shape: &[usize],
bindings: B,
) -> Result<ShapeMatch, ShapePatternError>
👎Deprecated since 0.1.0: Use bimm-contracts instead
pub fn match_bindings<B: ShapeBindingSource>( &self, shape: &[usize], bindings: B, ) -> Result<ShapeMatch, ShapePatternError>
Use bimm-contracts instead
Trait Implementations§
Source§impl Clone for ShapePattern
impl Clone for ShapePattern
Source§fn clone(&self) -> ShapePattern
fn clone(&self) -> ShapePattern
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 ShapePattern
impl Debug for ShapePattern
Source§impl Display for ShapePattern
impl Display for ShapePattern
impl Eq for ShapePattern
Source§impl Hash for ShapePattern
impl Hash for ShapePattern
Source§impl PartialEq for ShapePattern
impl PartialEq for ShapePattern
Source§fn eq(&self, other: &ShapePattern) -> bool
fn eq(&self, other: &ShapePattern) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ShapePattern
Auto Trait Implementations§
impl Freeze for ShapePattern
impl RefUnwindSafe for ShapePattern
impl Send for ShapePattern
impl Sync for ShapePattern
impl Unpin for ShapePattern
impl UnsafeUnpin for ShapePattern
impl UnwindSafe for ShapePattern
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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