pub struct MemStorage { /* private fields */ }Trait Implementations§
Source§impl Drop for MemStorage
impl Drop for MemStorage
Source§impl Storage for MemStorage
impl Storage for MemStorage
type Perspective = MemPerspective
type Segment = MemSegment
type FactIndex = MemFactIndex
type FactPerspective = MemFactPerspective
Source§fn get_linear_perspective(
&self,
parent: Location,
) -> Result<Self::Perspective, StorageError>
fn get_linear_perspective( &self, parent: Location, ) -> Result<Self::Perspective, StorageError>
Returns a linear perspective at the given location.
Source§fn get_fact_perspective(
&self,
location: Location,
) -> Result<Self::FactPerspective, StorageError>
fn get_fact_perspective( &self, location: Location, ) -> Result<Self::FactPerspective, StorageError>
Returns a fact perspective at the given location, intended for evaluating braids.
The fact perspective will include the facts of the command at the given location.
Source§fn new_merge_perspective(
&self,
left: Location,
right: Location,
_last_common_ancestor: Location,
policy_id: PolicyId,
braid: MemFactIndex,
) -> Result<Self::Perspective, StorageError>
fn new_merge_perspective( &self, left: Location, right: Location, _last_common_ancestor: Location, policy_id: PolicyId, braid: MemFactIndex, ) -> Result<Self::Perspective, StorageError>
Returns a merge perspective based on the given locations with the braid as prior facts.
Source§fn get_segment(&self, location: Location) -> Result<MemSegment, StorageError>
fn get_segment(&self, location: Location) -> Result<MemSegment, StorageError>
Returns the segment at the given location.
Source§fn get_head(&self) -> Result<Location, StorageError>
fn get_head(&self) -> Result<Location, StorageError>
Returns the location of head of the graph.
Source§fn write(
&mut self,
update: Self::Perspective,
) -> Result<Self::Segment, StorageError>
fn write( &mut self, update: Self::Perspective, ) -> Result<Self::Segment, StorageError>
Writes the given perspective to a segment.
Source§fn write_facts(
&mut self,
facts: Self::FactPerspective,
) -> Result<Self::FactIndex, StorageError>
fn write_facts( &mut self, facts: Self::FactPerspective, ) -> Result<Self::FactIndex, StorageError>
Writes the given fact perspective to a fact index.
Source§fn commit(&mut self, segment: Self::Segment) -> Result<(), StorageError>
fn commit(&mut self, segment: Self::Segment) -> Result<(), StorageError>
Sets the given segment as the head of the graph. Returns an error if
the current head is not an ancestor of the provided segment.
Source§fn get_location(
&self,
address: Address,
) -> Result<Option<Location>, StorageError>
fn get_location( &self, address: Address, ) -> Result<Option<Location>, StorageError>
Returns the location of Command with id if it has been stored by
searching from the head.
Source§fn get_location_from(
&self,
start: Location,
address: Address,
) -> Result<Option<Location>, StorageError>
fn get_location_from( &self, start: Location, address: Address, ) -> Result<Option<Location>, StorageError>
Returns the location of Command with id by searching from the given location.
Source§fn get_command_address(
&self,
location: Location,
) -> Result<Address, StorageError>
fn get_command_address( &self, location: Location, ) -> Result<Address, StorageError>
Returns the address of the command at the given location. Read more
Source§fn get_head_address(&self) -> Result<Address, StorageError>
fn get_head_address(&self) -> Result<Address, StorageError>
Returns the address of the head of the graph.
Source§fn is_ancestor(
&self,
search_location: Location,
segment: &Self::Segment,
) -> Result<bool, StorageError>
fn is_ancestor( &self, search_location: Location, segment: &Self::Segment, ) -> Result<bool, StorageError>
Determine whether the given location is an ancestor of the given segment.
Auto Trait Implementations§
impl Freeze for MemStorage
impl RefUnwindSafe for MemStorage
impl Send for MemStorage
impl Sync for MemStorage
impl Unpin for MemStorage
impl UnsafeUnpin for MemStorage
impl UnwindSafe for MemStorage
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.