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

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

Associated Types

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

type Graph[src]

type Adj[src]

Loading content...

Required methods

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

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

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

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

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

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

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

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

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

Loading content...

Implementors

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

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

type GraphError = SanakirjaError

type Adj = Adj

Loading content...