pub struct RelativePos { /* private fields */ }Implementations§
Source§impl RelativePos
impl RelativePos
Sourcepub fn new_checked(
before: MatchId,
after: MatchId,
) -> Result<Self, RelativePosError>
pub fn new_checked( before: MatchId, after: MatchId, ) -> Result<Self, RelativePosError>
Creates a new RelativePos after checking whether [before, after] is a valid range.
Sourcepub fn new(before: MatchId, after: MatchId) -> Self
pub fn new(before: MatchId, after: MatchId) -> Self
Creates a new RelativePos without checking before and after.
If you are taking input from a user, it is recommended to use RelativePos::new_checked instead.
Sourcepub fn before(before: MatchId) -> Self
pub fn before(before: MatchId) -> Self
Creates a RelativePos with only the before field set
Sourcepub fn after(after: MatchId) -> Self
pub fn after(after: MatchId) -> Self
Creates a RelativePos with only the after field set
Trait Implementations§
Source§impl Clone for RelativePos
impl Clone for RelativePos
Source§fn clone(&self) -> RelativePos
fn clone(&self) -> RelativePos
Returns a duplicate 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 Debug for RelativePos
impl Debug for RelativePos
Source§impl Default for RelativePos
impl Default for RelativePos
Source§fn default() -> RelativePos
fn default() -> RelativePos
Returns the “default value” for a type. Read more
Source§impl From<RelativePos> for Pagination
impl From<RelativePos> for Pagination
Source§fn from(position: RelativePos) -> Self
fn from(position: RelativePos) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RelativePos
impl PartialEq for RelativePos
Source§impl Serialize for RelativePos
impl Serialize for RelativePos
impl Copy for RelativePos
impl Eq for RelativePos
impl StructuralPartialEq for RelativePos
Auto Trait Implementations§
impl Freeze for RelativePos
impl RefUnwindSafe for RelativePos
impl Send for RelativePos
impl Sync for RelativePos
impl Unpin for RelativePos
impl UnwindSafe for RelativePos
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§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.