pub enum MemoryRecollection {
Recalled {
entries: Vec<MemoryEntry>,
relations: Vec<MemoryRelation>,
},
Unsupported,
}Expand description
What memory gave back.
Unsupported is a first-class answer rather than an error because
a backend that cannot travel in time is not misbehaving — it is a
smaller backend, and a caller told so plainly can offer the person
something else instead of showing them a failure.
Variants§
Recalled
What was remembered, and what connects it.
Both, always. Handing back entries alone would answer “what happened here” and silently refuse “how did this come about”, and a caller has no way to tell a memory with no reasons from a reader that dropped them.
Unsupported
The backend does not do this, and said so in its capabilities.
Implementations§
Source§impl MemoryRecollection
impl MemoryRecollection
Sourcepub fn of(entries: Vec<MemoryEntry>) -> Self
pub fn of(entries: Vec<MemoryEntry>) -> Self
Entries with nothing connecting them yet.
pub fn entries(&self) -> &[MemoryEntry]
Sourcepub fn relations(&self) -> &[MemoryRelation]
pub fn relations(&self) -> &[MemoryRelation]
The reasons between what came back — the part that can be followed rather than only read.
pub const fn is_supported(&self) -> bool
Trait Implementations§
Source§impl Clone for MemoryRecollection
impl Clone for MemoryRecollection
Source§fn clone(&self) -> MemoryRecollection
fn clone(&self) -> MemoryRecollection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MemoryRecollection
impl Debug for MemoryRecollection
impl Eq for MemoryRecollection
Source§impl PartialEq for MemoryRecollection
impl PartialEq for MemoryRecollection
impl StructuralPartialEq for MemoryRecollection
Auto Trait Implementations§
impl Freeze for MemoryRecollection
impl RefUnwindSafe for MemoryRecollection
impl Send for MemoryRecollection
impl Sync for MemoryRecollection
impl Unpin for MemoryRecollection
impl UnsafeUnpin for MemoryRecollection
impl UnwindSafe for MemoryRecollection
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