[][src]Trait please_pm::StringRep

pub trait StringRep {
    fn str_rep(&self) -> &'static str;
fn string_rep(&self) -> String; }

A simple trait for allowing the use of representing something as a string in an easy and extendible way.

Required methods

fn str_rep(&self) -> &'static str

Basic &str representation of the generic implamented trait.

fn string_rep(&self) -> String

Customised representation addressing the individual part of the implamented trait. If there is none, it is allowed to fall back to StringRep::str_rep.

Loading content...

Implementors

impl StringRep for ErrorKind[src]

fn str_rep(&self) -> &'static str[src]

Represent an error generically, allowing the use of a str.

fn string_rep(&self) -> String[src]

Represent the ErrorKind as a customised error, allowing more detailed responses at the cost of using a heap-allocated String.

Loading content...