Struct ciboulette::CibouletteStoreBuilder[][src]

pub struct CibouletteStoreBuilder { /* fields omitted */ }
Expand description

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,
    ids: CibouletteIdTypeSelector,
    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]

fn clone(&self) -> CibouletteStoreBuilder[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for CibouletteStoreBuilder[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for CibouletteStoreBuilder[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.