Struct rs_graph::attributed::AttributedBuilder[][src]

pub struct AttributedBuilder<B, Gx, Nx, Ex>(_, _);
👎 Deprecated since 0.17.0:

use rs-graph-derive crate instead

Default builder for an attributes graph.

This builder requires the attributes to be default constructable. All attributes will be initialized with these default values.

Trait Implementations

impl<'b, B, G, Gx, Nx, Ex> Builder for AttributedBuilder<B, Gx, Nx, Ex> where
    B: Builder<Graph = G>,
    G: GraphSize<'b>,
    Gx: Default,
    Nx: Default,
    Ex: Default
[src]

type Graph = Attributed<G, Gx, Nx, Ex>

The graph type produced by this builder.

type Node = B::Node

The type of a nodes.

type Edge = B::Edge

The type of an edge.

fn with_capacities(nnodes: usize, nedges: usize) -> Self[src]

Create a new, empty builder. Read more

fn reserve(&mut self, nnodes: usize, nedges: usize)[src]

Reserve memory for a certain number of nodes and edges.

fn num_nodes(&self) -> usize[src]

Return the current number of nodes.

fn num_edges(&self) -> usize[src]

Return the current number of nodes.

fn add_node(&mut self) -> Self::Node[src]

Add a new node.

fn add_nodes(&mut self, n: usize) -> Vec<Self::Node>[src]

Add n new nodes.

fn add_edge(&mut self, u: Self::Node, v: Self::Node) -> Self::Edge[src]

Add a new edge.

fn node2id(&self, u: Self::Node) -> usize[src]

Return a unique id of a node.

fn edge2id(&self, e: Self::Edge) -> usize[src]

Return a unique id of an edge.

fn into_graph(self) -> Attributed<G, Gx, Nx, Ex>[src]

Turn the builder into a graph.

fn new() -> Self[src]

Create a new, empty builder.

Auto Trait Implementations

impl<B, Gx, Nx, Ex> RefUnwindSafe for AttributedBuilder<B, Gx, Nx, Ex> where
    B: RefUnwindSafe,
    Ex: RefUnwindSafe,
    Gx: RefUnwindSafe,
    Nx: RefUnwindSafe

impl<B, Gx, Nx, Ex> Send for AttributedBuilder<B, Gx, Nx, Ex> where
    B: Send,
    Ex: Send,
    Gx: Send,
    Nx: Send

impl<B, Gx, Nx, Ex> Sync for AttributedBuilder<B, Gx, Nx, Ex> where
    B: Sync,
    Ex: Sync,
    Gx: Sync,
    Nx: Sync

impl<B, Gx, Nx, Ex> Unpin for AttributedBuilder<B, Gx, Nx, Ex> where
    B: Unpin,
    Ex: Unpin,
    Gx: Unpin,
    Nx: Unpin

impl<B, Gx, Nx, Ex> UnwindSafe for AttributedBuilder<B, Gx, Nx, Ex> where
    B: UnwindSafe,
    Ex: UnwindSafe,
    Gx: UnwindSafe,
    Nx: UnwindSafe

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, 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.