FMappingExt

Trait FMappingExt 

Source
pub trait FMappingExt: Sized {
Show 27 methods // Required methods fn new() -> Self; fn from_axes(axes: RSlice<'_, Term>) -> Self; fn pop(&mut self) -> ROption<Factor>; fn into_inner(self) -> RVec<Factor>; fn is_padding(&self) -> bool; fn has_terms(&self) -> bool; fn terms_with_stride(&self) -> RVec<TermPosition>; fn factors(&self) -> RSlice<'_, Factor>; fn contains_ident(&self, ident: Ident) -> bool; fn idents(&self) -> RVec<Ident>; fn find_symbol_size(&self, ident: Ident) -> ROption<usize>; fn eval(&self, position: usize) -> Index; fn is_ident_isolated(&self, ident: Ident) -> bool; fn into_factor(self) -> Factor; fn mul(self, inner: FMapping) -> FMapping; fn stride(self, stride: usize) -> FMapping; fn modulo(self, modulo: usize) -> FMapping; fn is_resize_of(&self, original: &FMapping) -> bool; fn to_mapping(&self) -> Mapping; fn divide_span( self, divisor: FMapping, span: usize, ) -> RResult<Division<Span>, DivisionError>; fn divide_relaxed(self, divisor: FMapping) -> Division<Relaxed>; fn divide_strict(self, divisor: FMapping) -> Division<Strict>; fn normalize(self) -> FMapping; fn remove_padding(self) -> FMapping; fn split_at(&self, target: usize) -> Tuple2<FMapping, FMapping>; fn pad(self, target: usize) -> FMapping; fn padding(self, padding: usize, kind: PaddingKind) -> FMapping;
}
Expand description

Methods for FMapping.

Required Methods§

Source

fn new() -> Self

Creates a new empty factor mapping.

Source

fn from_axes(axes: RSlice<'_, Term>) -> Self

Creates a factor mapping from a slice of terms (axes).

Source

fn pop(&mut self) -> ROption<Factor>

Pops the outermost factor of the mapping expression.

Source

fn into_inner(self) -> RVec<Factor>

Converts the factor mapping into a vector of factors.

Source

fn is_padding(&self) -> bool

Checks if the factor mapping is only padding.

Source

fn has_terms(&self) -> bool

Returns true if any factor is a Term (not Padding).

Source

fn terms_with_stride(&self) -> RVec<TermPosition>

Extracts each Term with its effective stride in this FMapping.

Source

fn factors(&self) -> RSlice<'_, Factor>

Returns a reference to the factors (innermost first).

Source

fn contains_ident(&self, ident: Ident) -> bool

Returns true if any term in this FMapping contains the given ident.

Source

fn idents(&self) -> RVec<Ident>

Returns the unique idents referenced in this FMapping.

Source

fn find_symbol_size(&self, ident: Ident) -> ROption<usize>

Returns the original declared size of the given ident’s Symbol.

Source

fn eval(&self, position: usize) -> Index

Evaluates this FMapping at the given position.

Source

fn is_ident_isolated(&self, ident: Ident) -> bool

Returns true if the given ident is isolated.

Source

fn into_factor(self) -> Factor

Converts the factor mapping into a single factor.

Source

fn mul(self, inner: FMapping) -> FMapping

Multiplies two factor mappings (composes outer × inner).

Source

fn stride(self, stride: usize) -> FMapping

Applies stride to the factor mapping.

Source

fn modulo(self, modulo: usize) -> FMapping

Applies modulo to the factor mapping.

Source

fn is_resize_of(&self, original: &FMapping) -> bool

Returns true if self is a resize of original.

Source

fn to_mapping(&self) -> Mapping

Converts the factor mapping into a mapping expression.

Source

fn divide_span( self, divisor: FMapping, span: usize, ) -> RResult<Division<Span>, DivisionError>

Divides the factor mapping by a single-term divisor with a span.

Source

fn divide_relaxed(self, divisor: FMapping) -> Division<Relaxed>

Divides the factor mapping with read-accessible (Top) matched-hole padding.

Source

fn divide_strict(self, divisor: FMapping) -> Division<Strict>

Divides the factor mapping with analysis-capable (Bottom) matched-hole padding.

Source

fn normalize(self) -> FMapping

Normalizes the factor mapping via round-trip through Mapping.

Source

fn remove_padding(self) -> FMapping

Removes all right padding.

Source

fn split_at(&self, target: usize) -> Tuple2<FMapping, FMapping>

Splits the mapping at target from the innermost side.

Source

fn pad(self, target: usize) -> FMapping

Removes existing padding and pads to target size.

Source

fn padding(self, padding: usize, kind: PaddingKind) -> FMapping

Applies padding to the factor mapping.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§