Trait raphtory::db::api::view::LayerOps

source ·
pub trait LayerOps<'graph> {
    type LayeredViewType;

    // Required methods
    fn layers<L: Into<Layer>>(
        &self,
        names: L,
    ) -> Result<Self::LayeredViewType, GraphError>;
    fn exclude_layers<L: Into<Layer>>(
        &self,
        layers: L,
    ) -> Result<Self::LayeredViewType, GraphError>;
    fn exclude_valid_layers<L: Into<Layer>>(
        &self,
        layers: L,
    ) -> Self::LayeredViewType;
    fn has_layer(&self, name: &str) -> bool;
    fn valid_layers<L: Into<Layer>>(&self, names: L) -> Self::LayeredViewType;

    // Provided method
    fn default_layer(&self) -> Self::LayeredViewType { ... }
}
Expand description

Trait defining layer operations

Required Associated Types§

Required Methods§

source

fn layers<L: Into<Layer>>( &self, names: L, ) -> Result<Self::LayeredViewType, GraphError>

Return a graph containing the layers in names. Errors if one or more of the layers do not exists.

source

fn exclude_layers<L: Into<Layer>>( &self, layers: L, ) -> Result<Self::LayeredViewType, GraphError>

Return a graph containing the excluded layers in names. Errors if one or more of the layers do not exists.

source

fn exclude_valid_layers<L: Into<Layer>>( &self, layers: L, ) -> Self::LayeredViewType

source

fn has_layer(&self, name: &str) -> bool

Check if name is a valid layer name

source

fn valid_layers<L: Into<Layer>>(&self, names: L) -> Self::LayeredViewType

Return a graph containing the layers in names. Any layers that do not exist are ignored.

Provided Methods§

source

fn default_layer(&self) -> Self::LayeredViewType

Return a graph containing only the default edge layer

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'graph, V: OneHopFilter<'graph> + 'graph> LayerOps<'graph> for V

§

type LayeredViewType = <V as OneHopFilter<'graph>>::Filtered<LayeredGraph<<V as OneHopFilter<'graph>>::FilteredGraph>>