Skip to main content

EngineView

Trait EngineView 

Source
pub trait EngineView {
    // Required methods
    fn root(&self, side: TreeSide) -> NodeId;
    fn visible(&self, id: NodeId) -> bool;
    fn nodes(&self, side: TreeSide) -> Vec<NodeId>;
    fn item(&self, id: NodeId) -> &ItemRef;
    fn parent(&self, id: NodeId) -> Option<NodeId>;
    fn children(&self, id: NodeId) -> Vec<NodeId>;
    fn has_children(&self, id: NodeId) -> bool;
    fn is_linked(&self, id: NodeId) -> bool;
    fn links(&self) -> Vec<LinkRef>;
    fn links_of(&self, id: NodeId) -> Vec<LinkRef>;
    fn artifact_bytes(
        &self,
        id: NodeId,
        format: &ArtifactFormat,
        data: &dyn DataAccess,
    ) -> BinocResult<Option<Vec<u8>>>;

    // Provided method
    fn identity_tokens(
        &self,
        _id: NodeId,
        _data: &dyn DataAccess,
    ) -> BinocResult<Option<Vec<IdentityToken>>> { ... }
}

Required Methods§

Source

fn root(&self, side: TreeSide) -> NodeId

Source

fn visible(&self, id: NodeId) -> bool

Source

fn nodes(&self, side: TreeSide) -> Vec<NodeId>

Source

fn item(&self, id: NodeId) -> &ItemRef

Source

fn parent(&self, id: NodeId) -> Option<NodeId>

Source

fn children(&self, id: NodeId) -> Vec<NodeId>

Source

fn has_children(&self, id: NodeId) -> bool

Source

fn is_linked(&self, id: NodeId) -> bool

Source

fn artifact_bytes( &self, id: NodeId, format: &ArtifactFormat, data: &dyn DataAccess, ) -> BinocResult<Option<Vec<u8>>>

Provided Methods§

Source

fn identity_tokens( &self, _id: NodeId, _data: &dyn DataAccess, ) -> BinocResult<Option<Vec<IdentityToken>>>

Partition-identity tokens for a node (CFM-72), or None when no registered IdentityExtractor matches an artifact the node carries.

The engine owns the dispatch: it tries each registered extractor’s format against the node’s artifacts and runs the first match. The rule stays format-ignorant — it sees only opaque, globally-comparable tokens — so the same partition rule serves every partition-capable format. Computed JIT over whatever node the caller asks about (intended: the unmatched residue); never stored.

Implementors§