Struct dysql_core::SortModel
source · pub struct SortModel {
pub field: String,
pub sort: String,
}
Fields§
§field: String
§sort: String
Trait Implementations§
source§impl Content for SortModel
impl Content for SortModel
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> Deserialize<'de> for SortModel
impl<'de> Deserialize<'de> for SortModel
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 Freeze for SortModel
impl RefUnwindSafe for SortModel
impl Send for SortModel
impl Sync for SortModel
impl Unpin for SortModel
impl UnwindSafe for SortModel
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