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

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<(SmallString, (u64, u64, u64, u64, u64, u64))>, TxnErr<Self::GraphError>>;
fn cursor_channels_prev<'txn>(
        &'txn self,
        cursor: &mut Self::ChannelsCursor
    ) -> Result<Option<(SmallString, (u64, u64, u64, u64, u64, u64))>, TxnErr<Self::GraphError>>;
fn cursor_channels<'txn>(
        &'txn self,
        db: &Self::Channels,
        pos: Option<(SmallString, Option<(u64, u64, u64, u64, u64, u64)>)>
    ) -> Result<Cursor<Self, &'txn Self, Self::ChannelsCursor, SmallString, (u64, u64, u64, u64, u64, u64)>, 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<(SmallString, (u64, u64, u64))>, TxnErr<Self::GraphError>>;
fn cursor_remotes_prev<'txn>(
        &'txn self,
        cursor: &mut Self::RemotesCursor
    ) -> Result<Option<(SmallString, (u64, u64, u64))>, TxnErr<Self::GraphError>>;
fn cursor_remotes<'txn>(
        &'txn self,
        db: &Self::Remotes,
        pos: Option<(SmallString, Option<(u64, u64, u64)>)>
    ) -> Result<Cursor<Self, &'txn Self, Self::RemotesCursor, SmallString, (u64, u64, u64)>, TxnErr<Self::GraphError>>;
fn cursor_remote_next<'txn>(
        &'txn self,
        cursor: &mut Self::RemoteCursor
    ) -> Result<Option<(u64, (Hash, Merkle))>, TxnErr<Self::GraphError>>;
fn cursor_remote_prev<'txn>(
        &'txn self,
        cursor: &mut Self::RemoteCursor
    ) -> Result<Option<(u64, (Hash, Merkle))>, TxnErr<Self::GraphError>>;
fn cursor_remote<'txn>(
        &'txn self,
        db: &Self::Remote,
        pos: Option<(u64, Option<(Hash, Merkle)>)>
    ) -> Result<Cursor<Self, &'txn Self, Self::RemoteCursor, u64, (Hash, Merkle)>, TxnErr<Self::GraphError>>;
fn rev_cursor_remote<'txn>(
        &'txn self,
        db: &Self::Remote,
        pos: Option<(u64, Option<(Hash, Merkle)>)>
    ) -> Result<RevCursor<Self, &'txn Self, Self::RemoteCursor, u64, (Hash, Merkle)>, TxnErr<Self::GraphError>>;
fn iter_remote<'txn>(
        &'txn self,
        remote: &Self::Remote,
        k: u64
    ) -> Result<Cursor<Self, &'txn Self, Self::RemoteCursor, u64, (Hash, Merkle)>, TxnErr<Self::GraphError>>;
fn iter_rev_remote<'txn>(
        &'txn self,
        remote: &Self::Remote,
        k: Option<u64>
    ) -> Result<RevCursor<Self, &'txn Self, Self::RemoteCursor, u64, (Hash, Merkle)>, 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, (Hash, Merkle))>, TxnErr<Self::GraphError>>;
fn get_remote_state(
        &self,
        remote: &Self::Remote,
        n: u64
    ) -> Result<Option<(u64, (Hash, Merkle))>, TxnErr<Self::GraphError>>;
fn remote_has_change(
        &self,
        remote: &RemoteRef<Self>,
        hash: Hash
    ) -> Result<bool, TxnErr<Self::GraphError>>;
fn remote_has_state(
        &self,
        remote: &RemoteRef<Self>,
        hash: Merkle
    ) -> 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<(SmallString, (u64, u64, u64, u64, u64, u64))>, TxnErr<Self::GraphError>>
[src]

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

fn cursor_channels<'txn>(
    &'txn self,
    db: &Self::Channels,
    pos: Option<(SmallString, Option<(u64, u64, u64, u64, u64, u64)>)>
) -> Result<Cursor<Self, &'txn Self, Self::ChannelsCursor, SmallString, (u64, u64, u64, u64, u64, u64)>, 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<(SmallString, (u64, u64, u64))>, TxnErr<Self::GraphError>>
[src]

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

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

fn cursor_remote_next<'txn>(
    &'txn self,
    cursor: &mut Self::RemoteCursor
) -> Result<Option<(u64, (Hash, Merkle))>, TxnErr<Self::GraphError>>
[src]

fn cursor_remote_prev<'txn>(
    &'txn self,
    cursor: &mut Self::RemoteCursor
) -> Result<Option<(u64, (Hash, Merkle))>, TxnErr<Self::GraphError>>
[src]

fn cursor_remote<'txn>(
    &'txn self,
    db: &Self::Remote,
    pos: Option<(u64, Option<(Hash, Merkle)>)>
) -> Result<Cursor<Self, &'txn Self, Self::RemoteCursor, u64, (Hash, Merkle)>, TxnErr<Self::GraphError>>
[src]

fn rev_cursor_remote<'txn>(
    &'txn self,
    db: &Self::Remote,
    pos: Option<(u64, Option<(Hash, Merkle)>)>
) -> Result<RevCursor<Self, &'txn Self, Self::RemoteCursor, u64, (Hash, Merkle)>, TxnErr<Self::GraphError>>
[src]

fn iter_remote<'txn>(
    &'txn self,
    remote: &Self::Remote,
    k: u64
) -> Result<Cursor<Self, &'txn Self, Self::RemoteCursor, u64, (Hash, Merkle)>, TxnErr<Self::GraphError>>
[src]

fn iter_rev_remote<'txn>(
    &'txn self,
    remote: &Self::Remote,
    k: Option<u64>
) -> Result<RevCursor<Self, &'txn Self, Self::RemoteCursor, u64, (Hash, Merkle)>, 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, (Hash, Merkle))>, TxnErr<Self::GraphError>>
[src]

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

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

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

Loading content...

Implementors

impl<T: Transaction> TxnT for GenericTxn<T>[src]

type Channels = Db<UnsafeSmallStr, (u64, u64, u64, u64, u64, u64)>

type ChannelsCursor = Cursor

type Remotes = Db<UnsafeSmallStr, (u64, u64, u64)>

type RemotesCursor = Cursor

type Remote = Db<u64, (Hash, Merkle)>

type Revremote = Db<Hash, u64>

type Remotestates = Db<Merkle, u64>

type RemoteCursor = Cursor

Loading content...