Trait libpijul::pristine::TxnT[][src]

pub trait TxnT: GraphTxnT + ChannelTxnT + DepsTxnT<DepsError = Self::GraphError> + TreeTxnT<TreeError = Self::GraphError> {
    type Channels;
    type ChannelsCursor;
    type Remotes;
    type RemotesCursor;
    type Remote;
    type Revremote;
    type Remotestates;
    type RemoteCursor;
    fn cursor_channels_next<'txn>(
        &'txn self,
        cursor: &mut Self::ChannelsCursor
    ) -> Result<Option<(&'txn SmallStr, &'txn T6)>, TxnErr<Self::GraphError>>;
fn cursor_channels_prev<'txn>(
        &'txn self,
        cursor: &mut Self::ChannelsCursor
    ) -> Result<Option<(&'txn SmallStr, &'txn T6)>, TxnErr<Self::GraphError>>;
fn cursor_channels<'txn>(
        &'txn self,
        db: &Self::Channels,
        pos: Option<(&SmallStr, Option<&T6>)>
    ) -> Result<Cursor<Self, &'txn Self, Self::ChannelsCursor, SmallStr, T6>, 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: &str
    ) -> 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: &str
    ) -> Result<RemotesIterator<'txn, Self>, TxnErr<Self::GraphError>>;
fn cursor_remotes_next<'txn>(
        &'txn self,
        cursor: &mut Self::RemotesCursor
    ) -> Result<Option<(&'txn SmallStr, &'txn T3)>, TxnErr<Self::GraphError>>;
fn cursor_remotes_prev<'txn>(
        &'txn self,
        cursor: &mut Self::RemotesCursor
    ) -> Result<Option<(&'txn SmallStr, &'txn T3)>, TxnErr<Self::GraphError>>;
fn cursor_remotes<'txn>(
        &'txn self,
        db: &Self::Remotes,
        pos: Option<(&SmallStr, Option<&T3>)>
    ) -> Result<Cursor<Self, &'txn Self, Self::RemotesCursor, SmallStr, T3>, 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: &str
    ) -> 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>>; }

The trait of immutable transactions.

Associated Types

Loading content...

Required methods

fn cursor_channels_next<'txn>(
    &'txn self,
    cursor: &mut Self::ChannelsCursor
) -> Result<Option<(&'txn SmallStr, &'txn T6)>, TxnErr<Self::GraphError>>
[src]

fn cursor_channels_prev<'txn>(
    &'txn self,
    cursor: &mut Self::ChannelsCursor
) -> Result<Option<(&'txn SmallStr, &'txn T6)>, TxnErr<Self::GraphError>>
[src]

fn cursor_channels<'txn>(
    &'txn self,
    db: &Self::Channels,
    pos: Option<(&SmallStr, Option<&T6>)>
) -> Result<Cursor<Self, &'txn Self, Self::ChannelsCursor, SmallStr, T6>, TxnErr<Self::GraphError>>
[src]

fn hash_from_prefix(
    &self,
    prefix: &str
) -> Result<(Hash, ChangeId), HashPrefixError<Self::GraphError>>
[src]

fn hash_from_prefix_remote(
    &self,
    remote: &RemoteRef<Self>,
    prefix: &str
) -> Result<Hash, HashPrefixError<Self::GraphError>>
[src]

fn load_channel(
    &self,
    name: &str
) -> Result<Option<ChannelRef<Self>>, TxnErr<Self::GraphError>>
[src]

fn load_remote(
    &self,
    name: &str
) -> Result<Option<RemoteRef<Self>>, TxnErr<Self::GraphError>>
[src]

fn iter_channels<'txn>(
    &'txn self,
    start: &str
) -> Result<ChannelIterator<'txn, Self>, TxnErr<Self::GraphError>>
[src]

Iterate a function over all channels. The loop stops the first time f returns false.

fn iter_remotes<'txn>(
    &'txn self,
    start: &str
) -> Result<RemotesIterator<'txn, Self>, TxnErr<Self::GraphError>>
[src]

fn cursor_remotes_next<'txn>(
    &'txn self,
    cursor: &mut Self::RemotesCursor
) -> Result<Option<(&'txn SmallStr, &'txn T3)>, TxnErr<Self::GraphError>>
[src]

fn cursor_remotes_prev<'txn>(
    &'txn self,
    cursor: &mut Self::RemotesCursor
) -> Result<Option<(&'txn SmallStr, &'txn T3)>, TxnErr<Self::GraphError>>
[src]

fn cursor_remotes<'txn>(
    &'txn self,
    db: &Self::Remotes,
    pos: Option<(&SmallStr, Option<&T3>)>
) -> Result<Cursor<Self, &'txn Self, Self::RemotesCursor, SmallStr, T3>, TxnErr<Self::GraphError>>
[src]

fn cursor_remote_next<'txn>(
    &'txn self,
    cursor: &mut Self::RemoteCursor
) -> Result<Option<(&'txn L64, &'txn Pair<SerializedHash, SerializedMerkle>)>, TxnErr<Self::GraphError>>
[src]

fn cursor_remote_prev<'txn>(
    &'txn self,
    cursor: &mut Self::RemoteCursor
) -> Result<Option<(&'txn L64, &'txn Pair<SerializedHash, SerializedMerkle>)>, TxnErr<Self::GraphError>>
[src]

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>>
[src]

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>>
[src]

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>>
[src]

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>>
[src]

fn get_remote(
    &mut self,
    name: &str
) -> Result<Option<RemoteRef<Self>>, TxnErr<Self::GraphError>>
[src]

fn last_remote(
    &self,
    remote: &Self::Remote
) -> Result<Option<(u64, &Pair<SerializedHash, SerializedMerkle>)>, TxnErr<Self::GraphError>>
[src]

fn get_remote_state(
    &self,
    remote: &Self::Remote,
    n: u64
) -> Result<Option<(u64, &Pair<SerializedHash, SerializedMerkle>)>, TxnErr<Self::GraphError>>
[src]

fn remote_has_change(
    &self,
    remote: &RemoteRef<Self>,
    hash: &SerializedHash
) -> Result<bool, TxnErr<Self::GraphError>>
[src]

fn remote_has_state(
    &self,
    remote: &RemoteRef<Self>,
    hash: &SerializedMerkle
) -> Result<bool, TxnErr<Self::GraphError>>
[src]

Loading content...

Implementors

impl<T: LoadPage<Error = Error>> TxnT for GenericTxn<T>[src]

type Channels = Db_<SmallStr, T6, Page<SmallStr, T6>>

type ChannelsCursor = Cursor<SmallStr, T6, Page<SmallStr, T6>>

type Remotes = Db_<SmallStr, T3, Page<SmallStr, T3>>

type RemotesCursor = Cursor<SmallStr, T3, Page<SmallStr, T3>>

type Remote = Db_<L64, Pair<SerializedHash, SerializedMerkle>, Page<L64, Pair<SerializedHash, SerializedMerkle>>>

type Revremote = Db_<SerializedHash, L64, Page<SerializedHash, L64>>

type Remotestates = Db_<SerializedMerkle, L64, Page<SerializedMerkle, L64>>

type RemoteCursor = Cursor<L64, Pair<SerializedHash, SerializedMerkle>, Page<L64, Pair<SerializedHash, SerializedMerkle>>>

Loading content...