Struct booklibrs::books::book_sys::BookSystem[][src]

pub struct BookSystem { /* fields omitted */ }

Reader Base structure, which contains only Book interfaces

Implementations

impl BookSystem[src]

pub const fn new() -> Self[src]

Constructs empty Book System

pub fn find_book(
    &self,
    title: &String,
    author: &String,
    pages: u16
) -> Option<usize>
[src]

Finds The Book. If book is not found, it' ll return TheBooks amount

pub unsafe fn add_books_unchecked(
    &mut self,
    ind: usize,
    amount: usize
) -> Result<&'_ mut Self, u8>
[src]

Adds simple books without any checks

pub fn add_books(
    &mut self,
    ind: usize,
    amount: usize
) -> Result<&'_ mut Self, u8>
[src]

Adds simple books with strong guarantee

pub unsafe fn add_book_unchecked(
    &mut self,
    title: String,
    author: String,
    pages: u16
) -> &mut Self
[src]

Adds new TheBook and ONE simple (I think it's logical) No checks provided

pub fn add_book(
    &mut self,
    title: String,
    author: String,
    pages: u16
) -> Result<&'_ mut Self, u8>
[src]

Adds new TheBook and ONE simple (I think it's logical)

pub unsafe fn remove_one_book_unchecked(&mut self, ind: usize, rind: usize)[src]

Remove one simple book by index without any checks

pub fn remove_one_book(
    &mut self,
    ind: usize,
    rind: usize
) -> Result<&'_ mut Self, u8>
[src]

Remove one simple book by index

pub unsafe fn remove_book_unchecked(&mut self, ind: usize) -> &mut Self[src]

Removes TheBook and all simple books without any checks

pub fn remove_book(&mut self, ind: usize) -> Result<&'_ mut Self, u8>[src]

Removes TheBook and all simple books

pub unsafe fn change_title_unchecked(
    &mut self,
    ind: usize,
    new_title: String
) -> &mut Self
[src]

Changes TheBook's and all simple books' title without any checks

pub fn change_title(
    &mut self,
    ind: usize,
    new_title: String
) -> Result<&'_ mut Self, u8>
[src]

Changes TheBook's and all simple books' title

pub unsafe fn change_author_unchecked(
    &mut self,
    ind: usize,
    new_author: String
) -> &mut Self
[src]

Changes TheBook's and all simple books' title without any checks

pub fn change_author(
    &mut self,
    ind: usize,
    new_author: String
) -> Result<&'_ mut Self, u8>
[src]

Changes TheBook's and all simple books' title

pub unsafe fn change_pages_unchecked(
    &mut self,
    ind: usize,
    new_pages: u16
) -> &mut Self
[src]

Changes TheBook's and all simple books' title without any checks

pub fn change_pages(
    &mut self,
    ind: usize,
    new_pages: String
) -> Result<&'_ mut Self, u8>
[src]

Changes TheBook's and all simple books' title

pub fn save(&self)[src]

Save to .yaml file

pub fn load(&mut self, reader_base: &mut ReaderBase)[src]

load from .yaml file

Trait Implementations

impl Clone for BookSystem[src]

impl Debug for BookSystem[src]

Print for BookSystem. It is used for debug code

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.