Struct graphific::Vertex[][src]

pub struct Vertex<K, V> where
    K: Key,
    V: Value
{ /* fields omitted */ }

A structure describing a vertex with a Key and a Value.

Implementations

impl<K, V> Vertex<K, V> where
    K: Key,
    V: Value
[src]

pub fn new(key: K) -> Self[src]

Create a new vertex with the default value.

pub fn with_value(key: K, value: V) -> Self[src]

Create a new vertex with a value.

pub fn key(&self) -> &K[src]

Get the key of the vertex.

pub fn value(&self) -> &V[src]

Get the value of the vertex.

pub fn set_value(&mut self, value: V)[src]

Set the value of the vertex.

Trait Implementations

impl<K: Clone, V: Clone> Clone for Vertex<K, V> where
    K: Key,
    V: Value
[src]

impl<K: Copy, V: Copy> Copy for Vertex<K, V> where
    K: Key,
    V: Value
[src]

impl<K: Debug, V: Debug> Debug for Vertex<K, V> where
    K: Key,
    V: Value
[src]

impl<K, V> Eq for Vertex<K, V> where
    K: Key,
    V: Value
[src]

impl<K, V> Hash for Vertex<K, V> where
    K: Key,
    V: Value
[src]

impl<K, V> Ord for Vertex<K, V> where
    K: Key,
    V: Value
[src]

impl<K, V> PartialEq<Vertex<K, V>> for Vertex<K, V> where
    K: Key,
    V: Value
[src]

impl<K, V> PartialOrd<Vertex<K, V>> for Vertex<K, V> where
    K: Key,
    V: Value
[src]

Auto Trait Implementations

impl<K, V> RefUnwindSafe for Vertex<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe
[src]

impl<K, V> Send for Vertex<K, V> where
    K: Send,
    V: Send
[src]

impl<K, V> Sync for Vertex<K, V> where
    K: Sync,
    V: Sync
[src]

impl<K, V> Unpin for Vertex<K, V> where
    K: Unpin,
    V: Unpin
[src]

impl<K, V> UnwindSafe for Vertex<K, V> where
    K: UnwindSafe,
    V: UnwindSafe
[src]

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.