Struct dysql_core::PageDto
source · pub struct PageDto<T> {
pub data: Option<T>,
pub page_size: u64,
pub page_no: u64,
pub total_page: Option<u64>,
pub start: Option<u64>,
pub total: Option<u64>,
pub is_sort: Option<bool>,
pub sort_model: Option<Vec<SortModel>>,
}
Fields§
§data: Option<T>
§page_size: u64
§page_no: u64
§total_page: Option<u64>
§start: Option<u64>
§total: Option<u64>
§is_sort: Option<bool>
§sort_model: Option<Vec<SortModel>>
Implementations§
Trait Implementations§
source§impl<T> Content for PageDto<T>where
T: Content,
impl<T> Content for PageDto<T>where
T: Content,
source§fn capacity_hint(&self, tpl: &Template) -> usize
fn capacity_hint(&self, tpl: &Template) -> usize
How much capacity is likely required for all the data in this
Content
for a given Template
.source§fn render_section<C, E, IC>(
&self,
section: Section<'_, C>,
encoder: &mut E,
_content: Option<&IC>
) -> Result<(), E::Error>where
C: ContentSequence,
E: Encoder,
fn render_section<C, E, IC>(
&self,
section: Section<'_, C>,
encoder: &mut E,
_content: Option<&IC>
) -> Result<(), E::Error>where
C: ContentSequence,
E: Encoder,
Render a section with self.
source§fn apply_section<C>(
&self,
section: SimpleSection<'_, C>
) -> Result<SimpleValue, SimpleError>where
C: ContentSequence,
fn apply_section<C>(
&self,
section: SimpleSection<'_, C>
) -> Result<SimpleValue, SimpleError>where
C: ContentSequence,
Apply a section with self.
source§fn render_notnone_section<C, E, IC>(
&self,
section: Section<'_, C>,
encoder: &mut E,
_content: Option<&IC>
) -> Result<(), E::Error>where
C: ContentSequence,
E: Encoder,
fn render_notnone_section<C, E, IC>(
&self,
section: Section<'_, C>,
encoder: &mut E,
_content: Option<&IC>
) -> Result<(), E::Error>where
C: ContentSequence,
E: Encoder,
Render a section with self.
source§fn render_field_escaped<E>(
&self,
hash: u64,
name: &str,
encoder: &mut E
) -> Result<bool, E::Error>where
E: Encoder,
fn render_field_escaped<E>(
&self,
hash: u64,
name: &str,
encoder: &mut E
) -> Result<bool, E::Error>where
E: Encoder,
Render a field by the hash or string of its name. Read more
source§fn render_field_unescaped<E>(
&self,
hash: u64,
name: &str,
encoder: &mut E
) -> Result<bool, E::Error>where
E: Encoder,
fn render_field_unescaped<E>(
&self,
hash: u64,
name: &str,
encoder: &mut E
) -> Result<bool, E::Error>where
E: Encoder,
Render a field by the hash or string of its name. Read more
fn apply_field_unescaped( &self, hash: u64, name: &str ) -> Result<SimpleValue, SimpleError>
source§fn render_field_section<P, E>(
&self,
hash: u64,
name: &str,
section: Section<'_, P>,
encoder: &mut E
) -> Result<bool, E::Error>where
P: ContentSequence,
E: Encoder,
fn render_field_section<P, E>(
&self,
hash: u64,
name: &str,
section: Section<'_, P>,
encoder: &mut E
) -> Result<bool, E::Error>where
P: ContentSequence,
E: Encoder,
Render a field by the hash or string of its name, as a section.
If successful, returns
true
if the field exists in this content, otherwise false
.fn apply_field_section<P>(
&self,
hash: u64,
name: &str,
section: SimpleSection<'_, P>
) -> Result<SimpleValue, SimpleError>where
P: ContentSequence,
source§fn render_field_inverse<P, E>(
&self,
hash: u64,
name: &str,
section: Section<'_, P>,
encoder: &mut E
) -> Result<bool, E::Error>where
P: ContentSequence,
E: Encoder,
fn render_field_inverse<P, E>(
&self,
hash: u64,
name: &str,
section: Section<'_, P>,
encoder: &mut E
) -> Result<bool, E::Error>where
P: ContentSequence,
E: Encoder,
Render a field, by the hash of or string its name, as an inverse section.
If successful, returns
true
if the field exists in this content, otherwise false
.source§fn render_field_notnone_section<P, E>(
&self,
hash: u64,
name: &str,
section: Section<'_, P>,
encoder: &mut E
) -> Result<bool, E::Error>where
P: ContentSequence,
E: Encoder,
fn render_field_notnone_section<P, E>(
&self,
hash: u64,
name: &str,
section: Section<'_, P>,
encoder: &mut E
) -> Result<bool, E::Error>where
P: ContentSequence,
E: Encoder,
Render a field by the hash or string of its name, as a section.
If successful, returns
true
if the field exists in this content, otherwise false
.source§fn is_truthy(&self) -> bool
fn is_truthy(&self) -> bool
Marks whether this content is truthy. Used when attempting to render a section.
source§fn render_escaped<E>(
&self,
_encoder: &mut E
) -> Result<(), <E as Encoder>::Error>where
E: Encoder,
fn render_escaped<E>(
&self,
_encoder: &mut E
) -> Result<(), <E as Encoder>::Error>where
E: Encoder,
Renders self as a variable to the encoder. Read more
source§fn render_unescaped<E>(
&self,
encoder: &mut E
) -> Result<(), <E as Encoder>::Error>where
E: Encoder,
fn render_unescaped<E>(
&self,
encoder: &mut E
) -> Result<(), <E as Encoder>::Error>where
E: Encoder,
Renders self as a variable to the encoder. Read more
source§fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Send + Sync>>
fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Send + Sync>>
Apply self as a variable. Read more
source§impl<'de, T> Deserialize<'de> for PageDto<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for PageDto<T>where
T: Deserialize<'de>,
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
Auto Trait Implementations§
impl<T> Freeze for PageDto<T>where
T: Freeze,
impl<T> RefUnwindSafe for PageDto<T>where
T: RefUnwindSafe,
impl<T> Send for PageDto<T>where
T: Send,
impl<T> Sync for PageDto<T>where
T: Sync,
impl<T> Unpin for PageDto<T>where
T: Unpin,
impl<T> UnwindSafe for PageDto<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