Skip to main content

NamedLinksStorage

Struct NamedLinksStorage 

Source
pub struct NamedLinksStorage<L: NamedTypeLinks> { /* private fields */ }
Expand description

A NamedTypeLinks layer seen as a LinksStorage; see the module documentation.

Implementations§

Source§

impl<L: NamedTypeLinks> NamedLinksStorage<L>

Source

pub fn new(links: L) -> Self

links as a storage.

The layer.

Source

pub fn into_inner(self) -> L

The layer, given back.

Trait Implementations§

Source§

impl<L: NamedTypeLinks> LinksStorage<u32> for NamedLinksStorage<L>

Creates a link and returns its address. A uniqueness resolver may return an existing link after removing the temporary allocation.
Ensures a link exists at index, creating placeholders as needed.
Returns the link stored at index, if any.
Returns true when a link exists at index.
Repoints index at source/target, returning the previous state.
Deletes index, returning the link that was removed.
Self::update_link, reporting every (before, after) change it made. Read more
Self::delete_link, reporting every (before, after) change it made. Read more
Returns every link in the store.
Returns every link matching the (optional) index/source/target pattern.
Finds the address of a link with the given source and target.
Returns the address of an existing (source, target) link, creating it when it does not exist yet.
Source§

fn flush(&mut self) -> Result<(), LinkError>

Makes every write durable on disk. Read more
Self::create_link, reporting every change, including partial changes before an error. Transactions need these callbacks to distinguish a new allocation from a duplicate resolved into an existing link. Read more
Self::ensure_link_created, reporting every placeholder it creates. Read more
Writes exactly this row for undo and replay, returning the previous state. Read more
Number of links currently stored.
Source§

fn capture_names(&mut self) -> Result<Option<BTreeMap<T, String>>, LinkError>

Optional logical name snapshot for transactional undo. Unnamed stores return None without allocation. Include names of absent/external rows.
Changes one logical name without recording. A named adapter must restore external-reference names even when their row currently does not exist.
Source§

fn has_external_changes(&self) -> Result<bool, LinkError>

Cheap check for “did another process write to this database since we last read or wrote it?”. Read more
Source§

fn reload(&mut self) -> Result<(), LinkError>

Re-reads the database from disk, discarding cached state. Read more

Auto Trait Implementations§

§

impl<L> !Freeze for NamedLinksStorage<L>

§

impl<L> !RefUnwindSafe for NamedLinksStorage<L>

§

impl<L> !Sync for NamedLinksStorage<L>

§

impl<L> Send for NamedLinksStorage<L>
where L: Send,

§

impl<L> Unpin for NamedLinksStorage<L>
where L: Unpin,

§

impl<L> UnsafeUnpin for NamedLinksStorage<L>
where L: UnsafeUnpin,

§

impl<L> UnwindSafe for NamedLinksStorage<L>
where L: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.