pub enum Index {
NewUnknown,
New(usize),
Existing(usize),
}Expand description
Result of a cache insertion.
Variants§
NewUnknown
A new entry whose position is not known.
New(usize)
A new (or never evaluated) entry at this position.
Existing(usize)
An entry evaluated before, at this position.
Implementations§
Source§impl Index
impl Index
pub fn new_unknown() -> Self
pub fn new_at(position: usize) -> Self
pub fn existing(position: usize) -> Self
pub fn position(&self) -> Option<usize>
pub fn has_position(&self) -> bool
Sourcepub fn to_cache_key(&self, fallback_path: &SearchPath) -> CacheKey
pub fn to_cache_key(&self, fallback_path: &SearchPath) -> CacheKey
A key for the entry: its position when known, fallback_path
otherwise.
Trait Implementations§
impl Copy for Index
impl Eq for Index
impl StructuralPartialEq for Index
Auto Trait Implementations§
impl Freeze for Index
impl RefUnwindSafe for Index
impl Send for Index
impl Sync for Index
impl Unpin for Index
impl UnsafeUnpin for Index
impl UnwindSafe for Index
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