Struct booklibrs::books::book_sys::BookSystem [−][src]
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]
&self,
title: &String,
author: &String,
pages: u16
) -> Option<usize>
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]
&mut self,
ind: usize,
amount: usize
) -> Result<&'_ mut Self, u8>
Adds simple books without any checks
pub fn add_books(
&mut self,
ind: usize,
amount: usize
) -> Result<&'_ mut Self, u8>
[src]
&mut self,
ind: usize,
amount: usize
) -> Result<&'_ mut Self, u8>
Adds simple books with strong guarantee
pub unsafe fn add_book_unchecked(
&mut self,
title: String,
author: String,
pages: u16
) -> &mut Self
[src]
&mut self,
title: String,
author: String,
pages: u16
) -> &mut Self
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]
&mut self,
title: String,
author: String,
pages: u16
) -> Result<&'_ mut Self, u8>
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]
&mut self,
ind: usize,
rind: usize
) -> Result<&'_ mut Self, u8>
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]
&mut self,
ind: usize,
new_title: String
) -> &mut Self
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]
&mut self,
ind: usize,
new_title: String
) -> Result<&'_ mut Self, u8>
Changes TheBook's and all simple books' title
pub unsafe fn change_author_unchecked(
&mut self,
ind: usize,
new_author: String
) -> &mut Self
[src]
&mut self,
ind: usize,
new_author: String
) -> &mut Self
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]
&mut self,
ind: usize,
new_author: String
) -> Result<&'_ mut Self, u8>
Changes TheBook's and all simple books' title
pub unsafe fn change_pages_unchecked(
&mut self,
ind: usize,
new_pages: u16
) -> &mut Self
[src]
&mut self,
ind: usize,
new_pages: u16
) -> &mut Self
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]
&mut self,
ind: usize,
new_pages: String
) -> Result<&'_ mut Self, u8>
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]
fn clone(&self) -> BookSystem
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for BookSystem
[src]
Print for BookSystem. It is used for debug code
Auto Trait Implementations
impl !RefUnwindSafe for BookSystem
[src]
impl !Send for BookSystem
[src]
impl !Sync for BookSystem
[src]
impl Unpin for BookSystem
[src]
impl !UnwindSafe for BookSystem
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,