GetCardInfo

Trait GetCardInfo 

Source
pub trait GetCardInfo: Sized {
    // Required methods
    fn get_name(&self) -> &str;
    fn get_front_image(&self) -> Result<String, CardError>;
    fn get_back_image(&self) -> Result<String, CardError>;
    fn parse(string: &str) -> Result<Self, ParseError>;
}
Expand description

Trait for all things that are cards

Required Methods§

Source

fn get_name(&self) -> &str

The card’s name

Source

fn get_front_image(&self) -> Result<String, CardError>

The card’s front image URL

§Errors

Whenever you decide

Source

fn get_back_image(&self) -> Result<String, CardError>

The card’s back image URL

§Errors

Whenever you decide

Source

fn parse(string: &str) -> Result<Self, ParseError>

Turns a String into a card.

§Errors

Whenever you decide

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§