Struct page_hunter::Book
source · pub struct Book<E> { /* private fields */ }Expand description
Implementations§
source§impl<E> Book<E>
impl<E> Book<E>
sourcepub fn get_sheets(&self) -> &Vec<Page<E>>
pub fn get_sheets(&self) -> &Vec<Page<E>>
Get sheets
sourcepub fn new(sheets: &Vec<Page<E>>) -> Book<E>where
E: Clone,
pub fn new(sheets: &Vec<Page<E>>) -> Book<E>where
E: Clone,
Create a new Book instance.
§Arguments:
§Returns:
A Book of the paginated items E if successful, otherwise a PaginationError is returned.
§Example:
use page_hunter::*;
let sheets: Vec<Page<u32>> = vec![
Page::new(&vec![1, 2], 0, 2, 5).unwrap_or_else(|error| {
panic!("Error creating page model: {:?}", error);
}),
Page::new(&vec![3, 4], 1, 2, 5).unwrap_or_else(|error| {
panic!("Error creating page model: {:?}", error);
}),
];
let book: Book<u32> = Book::new(&sheets);Trait Implementations§
source§impl<E> IntoIterator for Book<E>
impl<E> IntoIterator for Book<E>
Implementation of IntoIterator for Book.
Auto Trait Implementations§
impl<E> Freeze for Book<E>
impl<E> RefUnwindSafe for Book<E>where
E: RefUnwindSafe,
impl<E> Send for Book<E>where
E: Send,
impl<E> Sync for Book<E>where
E: Sync,
impl<E> Unpin for Book<E>where
E: Unpin,
impl<E> UnwindSafe for Book<E>where
E: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more