pub struct PatternView<'a> { /* private fields */ }Implementations§
Source§impl<'a> PatternView<'a>
impl<'a> PatternView<'a>
pub fn new(bars: &'a PatternRow) -> PatternView<'a>
pub fn with_config( bars: &'a PatternRow, start: usize, size: usize, base: usize, _end: usize, ) -> PatternView<'a>
pub fn data(&self) -> &PatternRow
pub fn begin(&self) -> Option<PatternType>
pub fn end(&self) -> Option<PatternType>
pub fn sum(&self, n: Option<usize>) -> PatternType
pub fn iter(&'a self) -> PatternViewIterator<'a> ⓘ
pub fn size(&self) -> usize
pub fn index(&self) -> usize
pub fn pixelsInFront(&self) -> PatternType
pub fn pixelsTillEnd(&self) -> PatternType
pub fn isAtFirstBar(&self) -> bool
pub fn isAtLastBar(&self) -> bool
pub fn isValidWithN(&self, n: usize) -> bool
pub fn isValid(&self) -> bool
pub fn has_quiet_zone_before( &self, scale: f32, acceptIfAtFirstBar: Option<bool>, ) -> bool
pub fn hasQuietZoneAfter( &self, scale: f32, acceptIfAtLastBar: Option<bool>, ) -> bool
pub fn subView(&self, offset: usize, size: Option<usize>) -> PatternView<'a>
pub fn shift(&mut self, n: usize) -> bool
pub fn skipPair(&mut self) -> bool
pub fn skipSymbol(&mut self) -> bool
pub fn skipSingle(&mut self) -> bool
pub fn extend(&mut self)
Trait Implementations§
Source§impl<'a> Clone for PatternView<'a>
impl<'a> Clone for PatternView<'a>
Source§fn clone(&self) -> PatternView<'a>
fn clone(&self) -> PatternView<'a>
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<'a> Debug for PatternView<'a>
impl<'a> Debug for PatternView<'a>
Source§impl<'a> From<&PatternView<'a>> for &'a [PatternType]
impl<'a> From<&PatternView<'a>> for &'a [PatternType]
Source§fn from(value: &PatternView<'a>) -> Self
fn from(value: &PatternView<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a, const LEN: usize> From<&PatternView<'a>> for [PatternType; LEN]
impl<'a, const LEN: usize> From<&PatternView<'a>> for [PatternType; LEN]
Source§fn from(value: &PatternView<'a>) -> Self
fn from(value: &PatternView<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&PatternView<'a>> for Vec<PatternType>
impl<'a> From<&PatternView<'a>> for Vec<PatternType>
Source§fn from(value: &PatternView<'a>) -> Self
fn from(value: &PatternView<'a>) -> Self
Converts to this type from the input type.
Source§impl Index<i32> for PatternView<'_>
impl Index<i32> for PatternView<'_>
Source§impl Index<isize> for PatternView<'_>
impl Index<isize> for PatternView<'_>
Source§impl Index<usize> for PatternView<'_>
impl Index<usize> for PatternView<'_>
impl<'a> Copy for PatternView<'a>
Auto Trait Implementations§
impl<'a> Freeze for PatternView<'a>
impl<'a> RefUnwindSafe for PatternView<'a>
impl<'a> Send for PatternView<'a>
impl<'a> Sync for PatternView<'a>
impl<'a> Unpin for PatternView<'a>
impl<'a> UnwindSafe for PatternView<'a>
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<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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.