Trait show_notes::e023::Eatable

source ·
pub trait Eatable {
    // Required method
    fn prepare(&self) -> String;

    // Provided method
    fn eat(&self) -> String { ... }
}
Expand description

A trait, to be implemented by types like Breakfast.

Required Methods§

source

fn prepare(&self) -> String

The stuff to do before you eat things. (No implementation!)

Provided Methods§

source

fn eat(&self) -> String

How to eat things. (Has a default implementation.)

Implementations on Foreign Types§

source§

impl Eatable for Regex

source§

fn prepare(&self) -> String

source§

fn eat(&self) -> String

Implementors§