pub enum PageAtom {
Single(isize),
Range(isize, isize),
}Expand description
One atomic spec inside a PageSelector.
A single index (5, -1) or an inclusive range (2-5, 5--1).
Indices are signed so the IM convention -1 = last page,
-2 = second-to-last, … can ride through unchanged. Resolution
against an actual page count is PageAtom::resolve.
Variants§
Single(isize)
Single page index. Negative values count from the end:
-1 = last page, -2 = second-to-last, ….
Range(isize, isize)
Inclusive range start..=end. Either endpoint may be negative
(5..=-1 = “page 5 through the last page”). After resolution
against the actual page count, start <= end is required.
Trait Implementations§
impl Eq for PageAtom
impl StructuralPartialEq for PageAtom
Auto Trait Implementations§
impl Freeze for PageAtom
impl RefUnwindSafe for PageAtom
impl Send for PageAtom
impl Sync for PageAtom
impl Unpin for PageAtom
impl UnsafeUnpin for PageAtom
impl UnwindSafe for PageAtom
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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.