Commit ed56d565990f6e662b98b1f5108bb8dc947547f2

Authored by Georg Hopp
1 parent fe29428f

Add restaurant example

  1 +[package]
  2 +name = "restaurant"
  3 +version = "0.1.0"
  4 +authors = ["Georg Hopp <georg@steffers.org>"]
  5 +edition = "2018"
  6 +
  7 +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
  8 +
  9 +[dependencies]
... ...
  1 +//
  2 +// Restaurant lib for demontrating rust modules.
  3 +//
  4 +// Georg Hopp <georg@steffers.org>
  5 +//
  6 +// Copyright © 2019 Georg Hopp
  7 +//
  8 +// This program is free software: you can redistribute it and/or modify
  9 +// it under the terms of the GNU General Public License as published by
  10 +// the Free Software Foundation, either version 3 of the License, or
  11 +// (at your option) any later version.
  12 +//
  13 +// This program is distributed in the hope that it will be useful,
  14 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
  15 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16 +// GNU General Public License for more details.
  17 +//
  18 +// You should have received a copy of the GNU General Public License
  19 +// along with this program. If not, see <http://www.gnu.org/licenses/>.
  20 +//
  21 +
  22 +mod front_of_house {
  23 + mod hosting {
  24 + fn add_to_waitlist() {}
  25 + fn seat_at_table() {}
  26 + }
  27 +
  28 + mod serving {
  29 + fn take_order() {}
  30 + fn serve_order() {}
  31 + fn take_payment() {}
  32 + }
  33 +}
... ...
Please register or login to post a comment