pub struct Page<T: Send + Sync> {
pub records: Vec<T>,
pub total: u64,
pub page_no: u64,
pub page_size: u64,
pub do_count: bool,
}
👎Deprecated: please use
rbatis::plugin::page::Page
Fields§
§records: Vec<T>
👎Deprecated: please use
rbatis::plugin::page::Page
data
total: u64
👎Deprecated: please use
rbatis::plugin::page::Page
total num
page_no: u64
👎Deprecated: please use
rbatis::plugin::page::Page
current page index
page_size: u64
👎Deprecated: please use
rbatis::plugin::page::Page
default 10
do_count: bool
👎Deprecated: please use
rbatis::plugin::page::Page
Control whether to execute count statements to count the total number
Implementations§
source§impl<T: Send + Sync> Page<T>
impl<T: Send + Sync> Page<T>
pub fn new(current: u64, page_size: u64) -> Self
👎Deprecated: please use
rbatis::plugin::page
pub fn new_option(current: &Option<u64>, page_size: &Option<u64>) -> Self
👎Deprecated: please use
rbatis::plugin::page
pub fn new_total(page_no: u64, page_size: u64, total: u64) -> Self
👎Deprecated: please use
rbatis::plugin::page
sourcepub fn make_pages(data: Vec<T>, page_size: u64) -> Vec<Page<T>>
👎Deprecated: please use rbatis::plugin::page
pub fn make_pages(data: Vec<T>, page_size: u64) -> Vec<Page<T>>
rbatis::plugin::page
create Vec
sourcepub fn make_ranges(total: u64, page_size: u64) -> Vec<(u64, u64)>
👎Deprecated: please use rbatis::plugin::page
pub fn make_ranges(total: u64, page_size: u64) -> Vec<(u64, u64)>
rbatis::plugin::page
create (Vec<offset,limit>) from total,page_size
pub fn set_total(self, total: u64) -> Self
👎Deprecated: please use
rbatis::plugin::page
pub fn set_page_size(self, arg: u64) -> Self
👎Deprecated: please use
rbatis::plugin::page
pub fn set_page_no(self, arg: u64) -> Self
👎Deprecated: please use
rbatis::plugin::page
sourcepub fn set_do_count(self, arg: bool) -> Self
👎Deprecated: please use rbatis::plugin::page
pub fn set_do_count(self, arg: bool) -> Self
rbatis::plugin::page
Control whether to execute count statements to count the total number
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Page<T>
impl<'de, T> Deserialize<'de> for Page<T>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T: Send + Sync> IPage<T> for Page<T>
impl<T: Send + Sync> IPage<T> for Page<T>
fn get_records(&self) -> &Vec<T>
fn get_records_mut(&mut self) -> &mut Vec<T>
fn set_records(self, arg: Vec<T>) -> Self
source§impl<T: Send + Sync> IPageRequest for Page<T>
impl<T: Send + Sync> IPageRequest for Page<T>
fn page_size(&self) -> u64
fn page_no(&self) -> u64
fn total(&self) -> u64
source§fn do_count(&self) -> bool
fn do_count(&self) -> bool
Control whether to execute count statements to count the total number
fn set_total(&mut self, arg: u64)
fn set_page_size(&mut self, arg: u64)
fn set_page_no(&mut self, arg: u64)
source§fn set_do_count(&mut self, arg: bool)
fn set_do_count(&mut self, arg: bool)
Control execute select count(1) from table
source§fn offset_limit(&self) -> u64
fn offset_limit(&self) -> u64
sum offset_limit
source§fn search_count(&self) -> bool
fn search_count(&self) -> bool
👎Deprecated: please use do_count()
source§fn set_search_count(&mut self, arg: bool)
fn set_search_count(&mut self, arg: bool)
👎Deprecated: please use set_do_count()
source§impl<T: PartialEq + Send + Sync> PartialEq for Page<T>
impl<T: PartialEq + Send + Sync> PartialEq for Page<T>
impl<T: Eq + Send + Sync> Eq for Page<T>
impl<T: Send + Sync> StructuralPartialEq for Page<T>
Auto Trait Implementations§
impl<T> Freeze for Page<T>
impl<T> RefUnwindSafe for Page<T>where
T: RefUnwindSafe,
impl<T> Send for Page<T>
impl<T> Sync for Page<T>
impl<T> Unpin for Page<T>where
T: Unpin,
impl<T> UnwindSafe for Page<T>where
T: 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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.