[][src]Trait libpijul::pristine::ChannelTxnT

pub trait ChannelTxnT: GraphTxnT {
    type Channel;
    type Changeset;
    type RevChangeset;
    type ChangesetCursor;
    type RevchangesetCursor;
    type States;
    pub fn name<'a>(&self, channel: &'a Self::Channel) -> &'a str;
pub fn graph<'a>(&self, channel: &'a Self::Channel) -> &'a Self::Graph;
pub fn apply_counter(&self, channel: &Self::Channel) -> u64;
pub fn last_modified(&self, channel: &Self::Channel) -> u64;
pub fn changes<'a>(&self, channel: &'a Self::Channel) -> &'a Self::Changeset;
pub fn rev_changes<'a>(
        &self,
        channel: &'a Self::Channel
    ) -> &'a Self::RevChangeset;
pub fn states<'a>(&self, channel: &'a Self::Channel) -> &'a Self::States;
pub fn get_changeset(
        &self,
        channel: &Self::Changeset,
        c: ChangeId
    ) -> Result<Option<u64>, TxnErr<Self::GraphError>>;
pub fn get_revchangeset(
        &self,
        channel: &Self::RevChangeset,
        c: u64
    ) -> Result<Option<(ChangeId, Merkle)>, TxnErr<Self::GraphError>>;
pub fn cursor_changeset<'txn>(
        &'txn self,
        channel: &Self::Changeset,
        pos: Option<ChangeId>
    ) -> Result<Cursor<Self, &'txn Self, Self::ChangesetCursor, ChangeId, u64>, TxnErr<Self::GraphError>>;
pub fn cursor_changeset_next(
        &self,
        cursor: &mut Self::ChangesetCursor
    ) -> Result<Option<(ChangeId, u64)>, TxnErr<Self::GraphError>>;
pub fn cursor_changeset_prev(
        &self,
        cursor: &mut Self::ChangesetCursor
    ) -> Result<Option<(ChangeId, u64)>, TxnErr<Self::GraphError>>;
pub fn cursor_revchangeset_ref<RT: Deref<Target = Self>>(
        txn: RT,
        channel: &Self::RevChangeset,
        pos: Option<u64>
    ) -> Result<Cursor<Self, RT, Self::RevchangesetCursor, u64, (ChangeId, Merkle)>, TxnErr<Self::GraphError>>;
pub fn rev_cursor_revchangeset<'txn>(
        &'txn self,
        channel: &Self::RevChangeset,
        pos: Option<u64>
    ) -> Result<RevCursor<Self, &'txn Self, Self::RevchangesetCursor, u64, (ChangeId, Merkle)>, TxnErr<Self::GraphError>>;
pub fn cursor_revchangeset_next(
        &self,
        cursor: &mut Self::RevchangesetCursor
    ) -> Result<Option<(u64, (ChangeId, Merkle))>, TxnErr<Self::GraphError>>;
pub fn cursor_revchangeset_prev(
        &self,
        cursor: &mut Self::RevchangesetCursor
    ) -> Result<Option<(u64, (ChangeId, Merkle))>, TxnErr<Self::GraphError>>;
pub fn channel_has_state(
        &self,
        channel: &Self::States,
        hash: Merkle
    ) -> Result<Option<u64>, TxnErr<Self::GraphError>>; }

Associated Types

Loading content...

Required methods

pub fn name<'a>(&self, channel: &'a Self::Channel) -> &'a str[src]

pub fn graph<'a>(&self, channel: &'a Self::Channel) -> &'a Self::Graph[src]

pub fn apply_counter(&self, channel: &Self::Channel) -> u64[src]

pub fn last_modified(&self, channel: &Self::Channel) -> u64[src]

pub fn changes<'a>(&self, channel: &'a Self::Channel) -> &'a Self::Changeset[src]

pub fn rev_changes<'a>(
    &self,
    channel: &'a Self::Channel
) -> &'a Self::RevChangeset
[src]

pub fn states<'a>(&self, channel: &'a Self::Channel) -> &'a Self::States[src]

pub fn get_changeset(
    &self,
    channel: &Self::Changeset,
    c: ChangeId
) -> Result<Option<u64>, TxnErr<Self::GraphError>>
[src]

pub fn get_revchangeset(
    &self,
    channel: &Self::RevChangeset,
    c: u64
) -> Result<Option<(ChangeId, Merkle)>, TxnErr<Self::GraphError>>
[src]

pub fn cursor_changeset<'txn>(
    &'txn self,
    channel: &Self::Changeset,
    pos: Option<ChangeId>
) -> Result<Cursor<Self, &'txn Self, Self::ChangesetCursor, ChangeId, u64>, TxnErr<Self::GraphError>>
[src]

pub fn cursor_changeset_next(
    &self,
    cursor: &mut Self::ChangesetCursor
) -> Result<Option<(ChangeId, u64)>, TxnErr<Self::GraphError>>
[src]

pub fn cursor_changeset_prev(
    &self,
    cursor: &mut Self::ChangesetCursor
) -> Result<Option<(ChangeId, u64)>, TxnErr<Self::GraphError>>
[src]

pub fn cursor_revchangeset_ref<RT: Deref<Target = Self>>(
    txn: RT,
    channel: &Self::RevChangeset,
    pos: Option<u64>
) -> Result<Cursor<Self, RT, Self::RevchangesetCursor, u64, (ChangeId, Merkle)>, TxnErr<Self::GraphError>>
[src]

pub fn rev_cursor_revchangeset<'txn>(
    &'txn self,
    channel: &Self::RevChangeset,
    pos: Option<u64>
) -> Result<RevCursor<Self, &'txn Self, Self::RevchangesetCursor, u64, (ChangeId, Merkle)>, TxnErr<Self::GraphError>>
[src]

pub fn cursor_revchangeset_next(
    &self,
    cursor: &mut Self::RevchangesetCursor
) -> Result<Option<(u64, (ChangeId, Merkle))>, TxnErr<Self::GraphError>>
[src]

pub fn cursor_revchangeset_prev(
    &self,
    cursor: &mut Self::RevchangesetCursor
) -> Result<Option<(u64, (ChangeId, Merkle))>, TxnErr<Self::GraphError>>
[src]

pub fn channel_has_state(
    &self,
    channel: &Self::States,
    hash: Merkle
) -> Result<Option<u64>, TxnErr<Self::GraphError>>
[src]

Loading content...

Implementors

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

type Channel = Channel

type Changeset = Db<ChangeId, u64>

type RevChangeset = Db<u64, (ChangeId, Merkle)>

type ChangesetCursor = Cursor

type RevchangesetCursor = Cursor

type States = Db<Merkle, u64>

Loading content...