[−][src]Trait libpijul::pristine::TxnT
The trait of immutable transactions.
Required methods
pub fn hash_from_prefix(&self, prefix: &str) -> Result<(Hash, ChangeId), Error>
[src]
pub fn hash_from_prefix_remote(
&self,
remote: &RemoteRef<Self>,
prefix: &str
) -> Result<Hash, Error>
[src]
&self,
remote: &RemoteRef<Self>,
prefix: &str
) -> Result<Hash, Error>
pub fn load_channel(&self, name: &str) -> Option<ChannelRef<Self>>
[src]
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
.
pub fn load_remote(&self, name: &str) -> Option<RemoteRef<Self>>
[src]
pub 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]
&'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>;
Iterate a function over all channels. The loop stops the first
time f
returns false
.
pub 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)>
pub fn get_remote(&mut self, name: &str) -> Option<RemoteRef<Self>>
[src]
pub fn last_remote(
&self,
remote: &Self::Remote
) -> Option<(u64, (Hash, Merkle))>
[src]
&self,
remote: &Self::Remote
) -> Option<(u64, (Hash, Merkle))>
pub 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))>
pub fn remote_has_change(&self, remote: &RemoteRef<Self>, hash: Hash) -> bool
[src]
pub fn remote_has_state(&self, remote: &RemoteRef<Self>, hash: Merkle) -> bool
[src]
pub fn channel_has_state(
&self,
channel: &ChannelRef<Self>,
hash: Merkle
) -> bool
[src]
&self,
channel: &ChannelRef<Self>,
hash: Merkle
) -> bool
Provided methods
pub fn tree_path(&self, v: Position<ChangeId>) -> Option<String>
[src]
pub fn current_state<'db, 'txn: 'db>(
&'txn self,
channel: &'db Channel<Self>
) -> Option<Merkle>
[src]
&'txn self,
channel: &'db Channel<Self>
) -> Option<Merkle>
Implementors
impl<T: Transaction> TxnT for GenericTxn<T>
[src]
pub fn hash_from_prefix(&self, s: &str) -> Result<(Hash, ChangeId), Error>
[src]
pub 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>
pub fn load_channel(&self, name: &str) -> Option<ChannelRef<Self>>
[src]
pub fn load_remote(&self, name: &str) -> Option<RemoteRef<Self>>
[src]
type Channels = Db<UnsafeSmallStr, (u64, u64, u64, u64, u64, u64)>
pub 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]
&'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>;
type Remotes = Db<UnsafeSmallStr, (u64, u64, u64)>
pub 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]
&'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>;
type Remote = Db<u64, (Hash, Merkle)>
type Revremote = Db<Hash, u64>
type Remotestates = Db<Merkle, u64>
pub 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)>
pub 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)>
pub fn get_remote(&mut self, name: &str) -> Option<RemoteRef<Self>>
[src]
pub fn last_remote(
&self,
remote: &Self::Remote
) -> Option<(u64, (Hash, Merkle))>
[src]
&self,
remote: &Self::Remote
) -> Option<(u64, (Hash, Merkle))>
pub 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))>