[−][src]Trait libanu::pristine::TxnT
The trait of immutable transactions.
Required methods
fn hash_from_prefix(&self, prefix: &str) -> Result<(Hash, ChangeId), Error>
fn hash_from_prefix_remote(
&self,
remote: &RemoteRef<Self>,
prefix: &str
) -> Result<Hash, Error>
&self,
remote: &RemoteRef<Self>,
prefix: &str
) -> Result<Hash, Error>
fn load_channel(&self, name: &str) -> Option<ChannelRef<Self>>
Returns a handle to the channel with name name
, if it
exists. In order to prevent memory leaks, channels have to be
committed after use.
See the note about the return type of
MutTxnT::open_or_create_channel
.
Since a mutable transaction type could implement both this
trait and MutTxnT
, the return type of
this function must use the same logic as the return type of
MutTxnT::open_or_create_channel
.
fn load_remote(&self, name: &str) -> Option<RemoteRef<Self>>
fn iter_channels<'txn>(&'txn self, start: &str) -> ChannelIterator<'txn, Self>ⓘNotable traits for ChannelIterator<'txn, T>
impl<'txn, T: TxnT> Iterator for ChannelIterator<'txn, T> type Item = ChannelRef<T>;
Notable traits for ChannelIterator<'txn, T>
impl<'txn, T: TxnT> Iterator for ChannelIterator<'txn, T> type Item = ChannelRef<T>;
Iterate a function over all channels. The loop stops the first
time f
returns false
.
fn iter_rev_remote<'txn>(
&'txn self,
remote: &Self::Remote,
k: Option<u64>
) -> RevCursor<Self, &'txn Self, Self::RemoteCursor, u64, (Hash, Merkle)>
&'txn self,
remote: &Self::Remote,
k: Option<u64>
) -> RevCursor<Self, &'txn Self, Self::RemoteCursor, u64, (Hash, Merkle)>
fn get_remote(&mut self, name: &str) -> Option<RemoteRef<Self>>
fn last_remote(&self, remote: &Self::Remote) -> Option<(u64, (Hash, Merkle))>
fn get_remote_state(
&self,
remote: &Self::Remote,
n: u64
) -> Option<(u64, (Hash, Merkle))>
&self,
remote: &Self::Remote,
n: u64
) -> Option<(u64, (Hash, Merkle))>
fn remote_has_change(&self, remote: &RemoteRef<Self>, hash: Hash) -> bool
fn remote_has_state(&self, remote: &RemoteRef<Self>, hash: Merkle) -> bool
fn channel_has_state(&self, channel: &ChannelRef<Self>, hash: Merkle) -> bool
Provided methods
fn tree_path(&self, v: Position<ChangeId>) -> Option<String>
fn current_state<'db, 'txn: 'db>(
&'txn self,
channel: &'db Channel<Self>
) -> Option<Merkle>
&'txn self,
channel: &'db Channel<Self>
) -> Option<Merkle>
Implementors
impl<T: Transaction> TxnT for GenericTxn<T>
[src]
fn hash_from_prefix(&self, s: &str) -> Result<(Hash, ChangeId), Error>
[src]
fn hash_from_prefix_remote<'txn>(
&'txn self,
remote: &RemoteRef<Self>,
s: &str
) -> Result<Hash, Error>
[src]
&'txn self,
remote: &RemoteRef<Self>,
s: &str
) -> Result<Hash, Error>
fn load_channel(&self, name: &str) -> Option<ChannelRef<Self>>
[src]
fn load_remote(&self, name: &str) -> Option<RemoteRef<Self>>
[src]
type Channels = Db<UnsafeSmallStr, (u64, u64, u64, u64, u64, u64)>
fn iter_channels<'txn>(&'txn self, start: &str) -> ChannelIterator<'txn, Self>ⓘNotable traits for ChannelIterator<'txn, T>
impl<'txn, T: TxnT> Iterator for ChannelIterator<'txn, T> type Item = ChannelRef<T>;
[src]
Notable traits for ChannelIterator<'txn, T>
impl<'txn, T: TxnT> Iterator for ChannelIterator<'txn, T> type Item = ChannelRef<T>;
type Remotes = Db<UnsafeSmallStr, (u64, u64, u64)>
fn iter_remotes<'txn>(&'txn self, start: &str) -> RemotesIterator<'txn, Self>ⓘNotable traits for RemotesIterator<'txn, T>
impl<'txn, T: TxnT> Iterator for RemotesIterator<'txn, T> type Item = RemoteRef<T>;
[src]
Notable traits for RemotesIterator<'txn, T>
impl<'txn, T: TxnT> Iterator for RemotesIterator<'txn, T> type Item = RemoteRef<T>;
type Remote = Db<u64, (Hash, Merkle)>
type Revremote = Db<Hash, u64>
type Remotestates = Db<Merkle, u64>
fn iter_remote<'txn>(
&'txn self,
remote: &Self::Remote,
k: u64
) -> Cursor<Self, &'txn Self, Self::RemoteCursor, u64, (Hash, Merkle)>
[src]
&'txn self,
remote: &Self::Remote,
k: u64
) -> Cursor<Self, &'txn Self, Self::RemoteCursor, u64, (Hash, Merkle)>
fn iter_rev_remote<'txn>(
&'txn self,
remote: &Self::Remote,
k: Option<u64>
) -> RevCursor<Self, &'txn Self, Self::RemoteCursor, u64, (Hash, Merkle)>
[src]
&'txn self,
remote: &Self::Remote,
k: Option<u64>
) -> RevCursor<Self, &'txn Self, Self::RemoteCursor, u64, (Hash, Merkle)>
fn get_remote(&mut self, name: &str) -> Option<RemoteRef<Self>>
[src]
fn last_remote(&self, remote: &Self::Remote) -> Option<(u64, (Hash, Merkle))>
[src]
fn get_remote_state(
&self,
remote: &Self::Remote,
n: u64
) -> Option<(u64, (Hash, Merkle))>
[src]
&self,
remote: &Self::Remote,
n: u64
) -> Option<(u64, (Hash, Merkle))>