#[non_exhaustive]pub struct ScanOptions { /* private fields */ }Expand description
Direction and inclusivity of an ErasedScanPlan.
The default is an inclusive forward scan: output k combines inputs
0..=k. exclusive combines inputs 0..k instead, so the first output is
the identity (0 for sums, 1 for products). reverse scans from the end
of the axis: output k combines inputs k..n (inclusive) or k+1..n
(exclusive).
§Examples
use strided_basic::ScanOptions;
let options = ScanOptions::new().exclusive(true).reverse(true);
assert!(options.is_exclusive() && options.is_reverse());
assert_eq!(ScanOptions::default(), ScanOptions::new());Implementations§
Source§impl ScanOptions
impl ScanOptions
Sourcepub const fn new() -> Self
pub const fn new() -> Self
An inclusive forward scan.
§Examples
use strided_basic::ScanOptions;
assert!(!ScanOptions::new().is_exclusive());Sourcepub const fn exclusive(self, exclusive: bool) -> Self
pub const fn exclusive(self, exclusive: bool) -> Self
Select an exclusive (true) or inclusive (false) scan.
§Examples
use strided_basic::ScanOptions;
assert!(ScanOptions::new().exclusive(true).is_exclusive());Sourcepub const fn reverse(self, reverse: bool) -> Self
pub const fn reverse(self, reverse: bool) -> Self
Select a reverse (true) or forward (false) scan.
§Examples
use strided_basic::ScanOptions;
assert!(ScanOptions::new().reverse(true).is_reverse());Sourcepub const fn is_exclusive(&self) -> bool
pub const fn is_exclusive(&self) -> bool
Whether the scan is exclusive.
§Examples
use strided_basic::ScanOptions;
assert!(!ScanOptions::default().is_exclusive());Sourcepub const fn is_reverse(&self) -> bool
pub const fn is_reverse(&self) -> bool
Whether the scan runs from the end of the axis.
§Examples
use strided_basic::ScanOptions;
assert!(!ScanOptions::default().is_reverse());Trait Implementations§
Source§impl Clone for ScanOptions
impl Clone for ScanOptions
impl Copy for ScanOptions
Source§impl Debug for ScanOptions
impl Debug for ScanOptions
Source§impl Default for ScanOptions
impl Default for ScanOptions
impl Eq for ScanOptions
Source§impl PartialEq for ScanOptions
impl PartialEq for ScanOptions
impl StructuralPartialEq for ScanOptions
Auto Trait Implementations§
impl Freeze for ScanOptions
impl RefUnwindSafe for ScanOptions
impl Send for ScanOptions
impl Sync for ScanOptions
impl Unpin for ScanOptions
impl UnsafeUnpin for ScanOptions
impl UnwindSafe for ScanOptions
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