[][src]Trait libpijul::pristine::GraphTxnT

pub trait GraphTxnT: Sized {
    type GraphError: Error + Send + Sync + 'static;
    type Graph;
    type Adj;
    pub fn get_graph<'txn>(
        &'txn self,
        db: &Self::Graph,
        key: Vertex<ChangeId>,
        value: Option<Edge>
    ) -> Result<Option<Edge>, TxnErr<Self::GraphError>>;
pub fn get_external(
        &self,
        p: ChangeId
    ) -> Result<Option<Hash>, TxnErr<Self::GraphError>>;
pub fn get_internal(
        &self,
        p: Hash
    ) -> Result<Option<ChangeId>, TxnErr<Self::GraphError>>;
pub fn init_adj(
        &self,
        g: &Self::Graph,
        v: Vertex<ChangeId>,
        dest: Position<ChangeId>,
        min: EdgeFlags,
        max: EdgeFlags
    ) -> Result<Self::Adj, TxnErr<Self::GraphError>>;
pub fn next_adj(
        &self,
        g: &Self::Graph,
        a: &mut Self::Adj
    ) -> Option<Result<Edge, TxnErr<Self::GraphError>>>;
pub fn find_block(
        &self,
        graph: &Self::Graph,
        p: Position<ChangeId>
    ) -> Result<Vertex<ChangeId>, BlockError<Self::GraphError>>;
pub fn find_block_end(
        &self,
        graph: &Self::Graph,
        p: Position<ChangeId>
    ) -> Result<Vertex<ChangeId>, BlockError<Self::GraphError>>; }

Associated Types

type GraphError: Error + Send + Sync + 'static[src]

type Graph[src]

type Adj[src]

Loading content...

Required methods

pub fn get_graph<'txn>(
    &'txn self,
    db: &Self::Graph,
    key: Vertex<ChangeId>,
    value: Option<Edge>
) -> Result<Option<Edge>, TxnErr<Self::GraphError>>
[src]

pub fn get_external(
    &self,
    p: ChangeId
) -> Result<Option<Hash>, TxnErr<Self::GraphError>>
[src]

Returns the external hash of an internal change identifier, if the change is known.

pub fn get_internal(
    &self,
    p: Hash
) -> Result<Option<ChangeId>, TxnErr<Self::GraphError>>
[src]

Returns the internal change identifier of change with external hash hash, if the change is known.

pub fn init_adj(
    &self,
    g: &Self::Graph,
    v: Vertex<ChangeId>,
    dest: Position<ChangeId>,
    min: EdgeFlags,
    max: EdgeFlags
) -> Result<Self::Adj, TxnErr<Self::GraphError>>
[src]

pub fn next_adj(
    &self,
    g: &Self::Graph,
    a: &mut Self::Adj
) -> Option<Result<Edge, TxnErr<Self::GraphError>>>
[src]

pub fn find_block(
    &self,
    graph: &Self::Graph,
    p: Position<ChangeId>
) -> Result<Vertex<ChangeId>, BlockError<Self::GraphError>>
[src]

pub fn find_block_end(
    &self,
    graph: &Self::Graph,
    p: Position<ChangeId>
) -> Result<Vertex<ChangeId>, BlockError<Self::GraphError>>
[src]

Loading content...

Implementors

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

type Graph = Db<Vertex<ChangeId>, Edge>

type GraphError = SanakirjaError

type Adj = Adj

Loading content...