Struct ciboulette::CibouletteStoreBuilder[][src]

pub struct CibouletteStoreBuilder { /* fields omitted */ }

Implementations

impl CibouletteStoreBuilder[src]

pub fn graph(
    &self
) -> &Graph<CibouletteResourceType, CibouletteRelationshipOptionBuilder, Directed, u16>
[src]

Graph of relationships between CibouletteResourceType

pub fn map(&self) -> &BTreeMap<String, NodeIndex<u16>>[src]

A map of every CibouletteResourceType in the graph mapped by their alias

pub fn config(&self) -> &CibouletteConfig[src]

The configuration

impl CibouletteStoreBuilder[src]

pub fn new(config: CibouletteConfig) -> Self[src]

Create a new bag

pub fn get_type_index(&self, name: &str) -> Option<&NodeIndex<u16>>[src]

Get a type index from the graph

pub fn get_type_with_index(
    &self,
    name: &str
) -> Option<(NodeIndex<u16>, &CibouletteResourceType)>
[src]

Get a type from the graph

pub fn get_type_if_exists(&self, name: &str) -> Option<&CibouletteResourceType>[src]

Get a type from the graph, returning an error if not found

pub fn get_type(
    &self,
    name: &str
) -> Result<&CibouletteResourceType, CibouletteError>
[src]

Get a type from the graph, returning an error if not found

pub fn get_rel(
    &self,
    from: &str,
    to: &str
) -> Result<(&CibouletteResourceType, &CibouletteRelationshipOptionBuilder), CibouletteError>
[src]

Get a relationship from the graph

pub fn add_type(
    &mut self,
    name: &str,
    id_type: CibouletteIdType,
    schema: MessyJsonObject
) -> Result<(), CibouletteError>
[src]

Add a type to the graph

pub fn build(self) -> Result<CibouletteStore, CibouletteError>[src]

Build the CibouletteStore

impl CibouletteStoreBuilder[src]

pub fn add_many_to_many_rel(
    &mut self,
    (from, alias_from): (&str, Option<&str>),
    (to, alias_to): (&str, Option<&str>),
    opt: CibouletteRelationshipManyToManyOptionBuilder
) -> Result<(), CibouletteError>
[src]

Add a relationships (one/many-to-one/many) to the graph, with the reverse relationship

pub fn add_many_to_many_rel_no_reverse_direct_only(
    &mut self,
    from: &str,
    (to, alias_to): (&str, Option<&str>),
    opt: CibouletteRelationshipManyToManyOptionBuilder
) -> Result<(), CibouletteError>
[src]

Add a relationships (one/many-to-one/many) to the graph, without insert OneToMany/ManyToOne

pub fn add_many_to_many_rel_no_reverse(
    &mut self,
    from: &str,
    (to, alias_to): (&str, Option<&str>),
    opt: CibouletteRelationshipManyToManyOptionBuilder
) -> Result<(), CibouletteError>
[src]

Add a relationships M2M to the graph, but only from from to to and not the reverse

impl CibouletteStoreBuilder[src]

pub fn add_one_to_many_rel(
    &mut self,
    opt: CibouletteRelationshipOneToManyOptionBuilder,
    alias_one_resource: Option<ArcStr>,
    alias_many_resource: Option<ArcStr>
) -> Result<(), CibouletteError>
[src]

Add a relationships (one-to-many) to the graph

pub fn add_one_to_many_rel_no_reverse(
    &mut self,
    opt: CibouletteRelationshipOneToManyOptionBuilder,
    alias_many_resource: Option<ArcStr>
) -> Result<(), CibouletteError>
[src]

Add a relationships (one-to-many) to the graph, without the reverse relationship

pub fn add_many_to_one_rel_no_reverse(
    &mut self,
    opt: CibouletteRelationshipOneToManyOptionBuilder,
    alias_one_resource: Option<ArcStr>
) -> Result<(), CibouletteError>
[src]

Add a relationships (one-to-many) to the graph, without the reverse relationship

Trait Implementations

impl Clone for CibouletteStoreBuilder[src]

impl Debug for CibouletteStoreBuilder[src]

impl Default for CibouletteStoreBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.