Struct prepona::storage::Error[][src]

pub struct Error { /* fields omitted */ }

Error type returned by storages in storage module.

Implementations

impl Error[src]

pub fn new(kind: ErrorKind, msg: String) -> Self[src]

Arguments

  • kind: Specifies what kind of error is being created.
  • msg: Cause of the error.

Returns

Constructed Error.

pub fn new_vnf(vertex_id: usize) -> Self[src]

Creates a VertexNotFound kind of error.

Arguments

vertex_id: Id of the vertex that has not been found.

Returns

Error with VertexNotFound kind and predefined msg.

pub fn new_enf(edge_id: usize) -> Self[src]

Creates an EdgeNotFound kind of error.

Arguments

edge_id: Id of the edge that has not been found.

Returns

Error with EdgeNotFound kind and predefined msg.

pub fn new_iei(src_id: usize, dst_id: usize, edge_id: usize) -> Self[src]

pub fn msg(&self) -> &String[src]

Returns

Cause of the error.

pub fn kind(&self) -> &ErrorKind[src]

Returns

Kind of the error.

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

Auto Trait Implementations

impl RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl UnwindSafe for Error

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> ToString for T where
    T: Display + ?Sized
[src]

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.