Trait libpijul::pristine::TxnT [−][src]
pub trait TxnT: GraphTxnT + ChannelTxnT + DepsTxnT<DepsError = <Self as GraphTxnT>::GraphError> + TreeTxnT<TreeError = <Self as GraphTxnT>::GraphError> { type Channels; type ChannelsCursor; type Remotes; type RemotesCursor; type Remote; type Revremote; type Remotestates; type RemoteCursor;}Show 24 methods
fn cursor_channels_next<'txn>(
&'txn self,
cursor: &mut Self::ChannelsCursor
) -> Result<Option<(&'txn SmallStr, &'txn SerializedChannel)>, TxnErr<Self::GraphError>>; fn cursor_channels_prev<'txn>(
&'txn self,
cursor: &mut Self::ChannelsCursor
) -> Result<Option<(&'txn SmallStr, &'txn SerializedChannel)>, TxnErr<Self::GraphError>>; fn cursor_channels<'txn>(
&'txn self,
db: &Self::Channels,
pos: Option<(&SmallStr, Option<&SerializedChannel>)>
) -> Result<Cursor<Self, &'txn Self, Self::ChannelsCursor, SmallStr, SerializedChannel>, TxnErr<Self::GraphError>>; fn hash_from_prefix(
&self,
prefix: &str
) -> Result<(Hash, ChangeId), HashPrefixError<Self::GraphError>>; fn hash_from_prefix_remote(
&self,
remote: &RemoteRef<Self>,
prefix: &str
) -> Result<Hash, HashPrefixError<Self::GraphError>>; fn load_channel(
&self,
name: &str
) -> Result<Option<ChannelRef<Self>>, TxnErr<Self::GraphError>>; fn load_remote(
&self,
name: &RemoteId
) -> Result<Option<RemoteRef<Self>>, TxnErr<Self::GraphError>>; fn iter_channels<'txn>(
&'txn self,
start: &str
) -> Result<ChannelIterator<'txn, Self>, TxnErr<Self::GraphError>>; fn iter_remotes<'txn>(
&'txn self,
start: &RemoteId
) -> Result<RemotesIterator<'txn, Self>, TxnErr<Self::GraphError>>; fn cursor_remotes_next<'txn>(
&'txn self,
cursor: &mut Self::RemotesCursor
) -> Result<Option<(&'txn RemoteId, &'txn SerializedRemote)>, TxnErr<Self::GraphError>>; fn cursor_remotes_prev<'txn>(
&'txn self,
cursor: &mut Self::RemotesCursor
) -> Result<Option<(&'txn RemoteId, &'txn SerializedRemote)>, TxnErr<Self::GraphError>>; fn cursor_remotes<'txn>(
&'txn self,
db: &Self::Remotes,
pos: Option<(&RemoteId, Option<&SerializedRemote>)>
) -> Result<Cursor<Self, &'txn Self, Self::RemotesCursor, RemoteId, SerializedRemote>, TxnErr<Self::GraphError>>; fn cursor_remote_next<'txn>(
&'txn self,
cursor: &mut Self::RemoteCursor
) -> Result<Option<(&'txn L64, &'txn Pair<SerializedHash, SerializedMerkle>)>, TxnErr<Self::GraphError>>; fn cursor_remote_prev<'txn>(
&'txn self,
cursor: &mut Self::RemoteCursor
) -> Result<Option<(&'txn L64, &'txn Pair<SerializedHash, SerializedMerkle>)>, TxnErr<Self::GraphError>>; fn cursor_remote<'txn>(
&'txn self,
db: &Self::Remote,
pos: Option<(&L64, Option<&Pair<SerializedHash, SerializedMerkle>>)>
) -> Result<Cursor<Self, &'txn Self, Self::RemoteCursor, L64, Pair<SerializedHash, SerializedMerkle>>, TxnErr<Self::GraphError>>; fn rev_cursor_remote<'txn>(
&'txn self,
db: &Self::Remote,
pos: Option<(&L64, Option<&Pair<SerializedHash, SerializedMerkle>>)>
) -> Result<RevCursor<Self, &'txn Self, Self::RemoteCursor, L64, Pair<SerializedHash, SerializedMerkle>>, TxnErr<Self::GraphError>>; fn iter_remote<'txn>(
&'txn self,
remote: &Self::Remote,
k: u64
) -> Result<Cursor<Self, &'txn Self, Self::RemoteCursor, L64, Pair<SerializedHash, SerializedMerkle>>, TxnErr<Self::GraphError>>; fn iter_rev_remote<'txn>(
&'txn self,
remote: &Self::Remote,
k: Option<L64>
) -> Result<RevCursor<Self, &'txn Self, Self::RemoteCursor, L64, Pair<SerializedHash, SerializedMerkle>>, TxnErr<Self::GraphError>>; fn get_remote(
&mut self,
name: RemoteId
) -> Result<Option<RemoteRef<Self>>, TxnErr<Self::GraphError>>; fn last_remote(
&self,
remote: &Self::Remote
) -> Result<Option<(u64, &Pair<SerializedHash, SerializedMerkle>)>, TxnErr<Self::GraphError>>; fn get_remote_state(
&self,
remote: &Self::Remote,
n: u64
) -> Result<Option<(u64, &Pair<SerializedHash, SerializedMerkle>)>, TxnErr<Self::GraphError>>; fn remote_has_change(
&self,
remote: &RemoteRef<Self>,
hash: &SerializedHash
) -> Result<bool, TxnErr<Self::GraphError>>; fn remote_has_state(
&self,
remote: &RemoteRef<Self>,
hash: &SerializedMerkle
) -> Result<bool, TxnErr<Self::GraphError>>; fn current_channel(&self) -> Result<&str, Self::GraphError>;
Expand description
The trait of immutable transactions.
Associated Types
Required methods
fn cursor_channels_next<'txn>(
&'txn self,
cursor: &mut Self::ChannelsCursor
) -> Result<Option<(&'txn SmallStr, &'txn SerializedChannel)>, TxnErr<Self::GraphError>>
fn cursor_channels_prev<'txn>(
&'txn self,
cursor: &mut Self::ChannelsCursor
) -> Result<Option<(&'txn SmallStr, &'txn SerializedChannel)>, TxnErr<Self::GraphError>>
fn cursor_channels<'txn>(
&'txn self,
db: &Self::Channels,
pos: Option<(&SmallStr, Option<&SerializedChannel>)>
) -> Result<Cursor<Self, &'txn Self, Self::ChannelsCursor, SmallStr, SerializedChannel>, TxnErr<Self::GraphError>>
fn hash_from_prefix(
&self,
prefix: &str
) -> Result<(Hash, ChangeId), HashPrefixError<Self::GraphError>>
fn hash_from_prefix_remote(
&self,
remote: &RemoteRef<Self>,
prefix: &str
) -> Result<Hash, HashPrefixError<Self::GraphError>>
fn load_channel(
&self,
name: &str
) -> Result<Option<ChannelRef<Self>>, TxnErr<Self::GraphError>>
fn load_remote(
&self,
name: &RemoteId
) -> Result<Option<RemoteRef<Self>>, TxnErr<Self::GraphError>>
fn iter_channels<'txn>(
&'txn self,
start: &str
) -> Result<ChannelIterator<'txn, Self>, TxnErr<Self::GraphError>>
fn iter_channels<'txn>(
&'txn self,
start: &str
) -> Result<ChannelIterator<'txn, Self>, TxnErr<Self::GraphError>>
Iterate a function over all channels. The loop stops the first
time f
returns false
.