pub struct LinearStorage<W> { /* private fields */ }Trait Implementations§
Source§impl<F: Write> Storage for LinearStorage<F>
impl<F: Write> Storage for LinearStorage<F>
type Perspective = LinearPerspective<<F as Write>::ReadOnly>
type FactPerspective = LinearFactPerspective<<F as Write>::ReadOnly>
type Segment = LinearSegment<<F as Write>::ReadOnly>
type FactIndex = LinearFactIndex<<F as Write>::ReadOnly>
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: Self::FactIndex,
) -> Result<Self::Perspective, StorageError>
fn new_merge_perspective( &self, left: Location, right: Location, last_common_ancestor: Location, policy_id: PolicyId, braid: Self::FactIndex, ) -> 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<Self::Segment, StorageError>
fn get_segment(&self, location: Location) -> Result<Self::Segment, 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 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 write(
&mut self,
perspective: Self::Perspective,
) -> Result<Self::Segment, StorageError>
fn write( &mut self, perspective: 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 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<W> Freeze for LinearStorage<W>where
W: Freeze,
impl<W> RefUnwindSafe for LinearStorage<W>where
W: RefUnwindSafe,
impl<W> Send for LinearStorage<W>where
W: Send,
impl<W> Sync for LinearStorage<W>where
W: Sync,
impl<W> Unpin for LinearStorage<W>where
W: Unpin,
impl<W> UnsafeUnpin for LinearStorage<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for LinearStorage<W>where
W: UnwindSafe,
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.