Trait dysql::Content

source ·
pub trait Content {
Show 16 methods // Provided methods fn is_truthy(&self) -> bool { ... } fn capacity_hint(&self, _tpl: &Template) -> usize { ... } fn render_escaped<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 { ... } fn apply_unescaped( &self ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>> { ... } fn render_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, content: Option<&IC> ) -> Result<(), <E as Encoder>::Error> where C: ContentSequence, E: Encoder, IC: Content { ... } fn apply_section<C>( &self, section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>> where C: ContentSequence { ... } fn render_inverse<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, content: Option<&IC> ) -> Result<(), <E as Encoder>::Error> where C: ContentSequence, E: Encoder, IC: Content { ... } fn render_notnone_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, content: Option<&IC> ) -> Result<(), <E as Encoder>::Error> where C: ContentSequence, E: Encoder, IC: Content { ... } fn render_field_escaped<E>( &self, _hash: u64, _name: &str, _encoder: &mut E ) -> Result<bool, <E as Encoder>::Error> where E: Encoder { ... } fn render_field_unescaped<E>( &self, _hash: u64, _name: &str, _encoder: &mut E ) -> Result<bool, <E as Encoder>::Error> where E: Encoder { ... } fn apply_field_unescaped( &self, _hash: u64, _name: &str ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>> { ... } fn render_field_section<C, E>( &self, _hash: u64, _name: &str, _section: Section<'_, C>, _encoder: &mut E ) -> Result<bool, <E as Encoder>::Error> where C: ContentSequence, E: Encoder { ... } fn apply_field_section<C>( &self, _hash: u64, _name: &str, _section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>> where C: ContentSequence { ... } fn render_field_inverse<C, E>( &self, _hash: u64, _name: &str, _section: Section<'_, C>, _encoder: &mut E ) -> Result<bool, <E as Encoder>::Error> where C: ContentSequence, E: Encoder { ... } fn render_field_notnone_section<C, E>( &self, _hash: u64, _name: &str, _section: Section<'_, C>, _encoder: &mut E ) -> Result<bool, <E as Encoder>::Error> where C: ContentSequence, E: Encoder { ... }
}
Expand description

Trait allowing the rendering to quickly access data stored in the type that implements it. You needn’t worry about implementing it, in virtually all cases the #[derive(Content)] attribute above your types should be sufficient.

Provided Methods§

source

fn is_truthy(&self) -> bool

Marks whether this content is truthy. Used when attempting to render a section.

source

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_escaped<E>( &self, _encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

Renders self as a variable to the encoder.

This will escape HTML characters, eg: < will become &lt;.

source

fn render_unescaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

Renders self as a variable to the encoder.

This doesn’t perform any escaping at all.

source

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

Apply self as a variable.

This doesn’t perform any escaping at all.

source

fn render_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder, IC: Content,

Render a section with self.

source

fn apply_section<C>( &self, section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>
where C: ContentSequence,

Apply a section with self.

source

fn render_inverse<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder, IC: Content,

Render a section with self.

source

fn render_notnone_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder, IC: Content,

Render a section with self.

source

fn render_field_escaped<E>( &self, _hash: u64, _name: &str, _encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

Render a field by the hash or string of its name.

This will escape HTML characters, eg: < will become &lt;. If successful, returns true if the field exists in this content, otherwise false.

source

fn render_field_unescaped<E>( &self, _hash: u64, _name: &str, _encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

Render a field by the hash or string of its name.

This doesn’t perform any escaping at all. If successful, returns true if the field exists in this content, otherwise false.

source

fn apply_field_unescaped( &self, _hash: u64, _name: &str ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source

fn render_field_section<C, E>( &self, _hash: u64, _name: &str, _section: Section<'_, C>, _encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: 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 apply_field_section<C>( &self, _hash: u64, _name: &str, _section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>
where C: ContentSequence,

source

fn render_field_inverse<C, E>( &self, _hash: u64, _name: &str, _section: Section<'_, C>, _encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: 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<C, E>( &self, _hash: u64, _name: &str, _section: Section<'_, C>, _encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: 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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Content for bool

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for f32

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for f64

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for i8

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for i16

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for i32

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for i64

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for i128

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for isize

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for str

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn render_unescaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for u8

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for u16

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for u32

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for u64

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for u128

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for ()

source§

fn is_truthy(&self) -> bool

source§

impl Content for usize

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for String

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn render_unescaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for Cow<'_, str, Wide>

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn render_unescaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

impl Content for DateTime<FixedOffset>

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_unescaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for DateTime<Local>

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_unescaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for DateTime<Utc>

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_unescaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for NaiveDateTime

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_unescaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl Content for Uuid

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, _tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

impl<K, V> Content for BTreeMap<K, V>
where K: Borrow<str> + Ord + Debug + Clone, V: Content + Clone,

source§

fn render_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

Render a section with self.

source§

fn render_notnone_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

Render a section with self.

source§

fn is_truthy(&self) -> bool

source§

fn render_field_escaped<E>( &self, _: u64, name: &str, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

source§

fn render_field_unescaped<E>( &self, _: u64, name: &str, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

source§

fn render_field_section<C, E>( &self, _: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_field_notnone_section<C, E>( &self, _: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_field_inverse<C, E>( &self, _: u64, name: &str, _section: Section<'_, C>, _encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

impl<K, V, S> Content for HashMap<K, V, S>
where K: Borrow<str> + Hash + Eq + Debug + Clone, V: Content + Clone, S: BuildHasher + Clone,

source§

fn render_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

Render a section with self.

source§

fn render_notnone_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

Render a section with self.

source§

fn is_truthy(&self) -> bool

source§

fn render_field_escaped<E>( &self, _: u64, name: &str, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

source§

fn render_field_unescaped<E>( &self, _: u64, name: &str, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

source§

fn render_field_section<C, E>( &self, _: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_field_notnone_section<C, E>( &self, _: u64, name: &str, _section: Section<'_, C>, _encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_field_inverse<C, E>( &self, _: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

impl<T> Content for Cow<'_, T>
where T: Content + ToOwned + ?Sized,

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn render_unescaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

fn render_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn apply_section<C>( &self, section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>
where C: ContentSequence,

source§

fn render_inverse<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_notnone_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_field_escaped<E>( &self, hash: u64, name: &str, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

source§

fn render_field_unescaped<E>( &self, hash: u64, name: &str, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_field_unescaped( &self, hash: u64, name: &str ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

fn render_field_section<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn apply_field_section<C>( &self, hash: u64, name: &str, section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>
where C: ContentSequence,

source§

fn render_field_inverse<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_field_notnone_section<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

impl<T> Content for Option<T>
where T: Content,

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn render_unescaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

fn render_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn apply_section<C>( &self, section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>
where C: ContentSequence,

source§

fn render_notnone_section<C, E, IC>( &self, _section: Section<'_, C>, _encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

impl<T> Content for &T
where T: Content + ?Sized,

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn render_unescaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

fn render_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn apply_section<C>( &self, section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>
where C: ContentSequence,

source§

fn render_inverse<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_notnone_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_field_escaped<E>( &self, hash: u64, name: &str, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

source§

fn render_field_unescaped<E>( &self, hash: u64, name: &str, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_field_unescaped( &self, hash: u64, name: &str ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

fn render_field_section<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn apply_field_section<C>( &self, hash: u64, name: &str, section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>
where C: ContentSequence,

source§

fn render_field_inverse<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_field_notnone_section<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

impl<T> Content for [T]
where T: Content,

source§

fn is_truthy(&self) -> bool

source§

fn render_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_notnone_section<C, E, IC>( &self, _section: Section<'_, C>, _encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

impl<T> Content for Box<T>
where T: Content + ?Sized,

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn render_unescaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

fn render_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn apply_section<C>( &self, section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>
where C: ContentSequence,

source§

fn render_inverse<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_notnone_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_field_escaped<E>( &self, hash: u64, name: &str, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

source§

fn render_field_unescaped<E>( &self, hash: u64, name: &str, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_field_unescaped( &self, hash: u64, name: &str ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

fn render_field_section<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn apply_field_section<C>( &self, hash: u64, name: &str, section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>
where C: ContentSequence,

source§

fn render_field_inverse<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_field_notnone_section<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

impl<T> Content for Rc<T>
where T: Content + ?Sized,

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn render_unescaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

fn render_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn apply_section<C>( &self, section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>
where C: ContentSequence,

source§

fn render_inverse<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_notnone_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_field_escaped<E>( &self, hash: u64, name: &str, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

source§

fn render_field_unescaped<E>( &self, hash: u64, name: &str, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_field_unescaped( &self, hash: u64, name: &str ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

fn render_field_section<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn apply_field_section<C>( &self, hash: u64, name: &str, section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>
where C: ContentSequence,

source§

fn render_field_inverse<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_field_notnone_section<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

impl<T> Content for Arc<T>
where T: Content + ?Sized,

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn render_unescaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

fn render_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn apply_section<C>( &self, section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>
where C: ContentSequence,

source§

fn render_inverse<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_notnone_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_field_escaped<E>( &self, hash: u64, name: &str, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

source§

fn render_field_unescaped<E>( &self, hash: u64, name: &str, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_field_unescaped( &self, hash: u64, name: &str ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

fn render_field_section<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn apply_field_section<C>( &self, hash: u64, name: &str, section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>
where C: ContentSequence,

source§

fn render_field_inverse<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_field_notnone_section<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

impl<T> Content for Vec<T>
where T: Content,

source§

fn is_truthy(&self) -> bool

source§

fn render_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_notnone_section<C, E, IC>( &self, _section: Section<'_, C>, _encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

impl<T> Content for Cow<'_, [T], Wide>
where T: Content + Clone + ?Sized,

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn render_unescaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

fn render_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn apply_section<C>( &self, section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>
where C: ContentSequence,

source§

fn render_inverse<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_notnone_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_field_escaped<E>( &self, hash: u64, name: &str, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

source§

fn render_field_unescaped<E>( &self, hash: u64, name: &str, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_field_unescaped( &self, hash: u64, name: &str ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

fn render_field_section<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn apply_field_section<C>( &self, hash: u64, name: &str, section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>
where C: ContentSequence,

source§

fn render_field_inverse<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_field_notnone_section<C, E>( &self, hash: u64, name: &str, section: Section<'_, C>, encoder: &mut E ) -> Result<bool, <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

impl<T, U> Content for Result<T, U>
where T: Content, U: Debug,

source§

fn is_truthy(&self) -> bool

source§

fn capacity_hint(&self, tpl: &Template) -> usize

source§

fn render_escaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn render_unescaped<E>( &self, encoder: &mut E ) -> Result<(), <E as Encoder>::Error>
where E: Encoder,

source§

fn apply_unescaped(&self) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>

source§

fn render_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn apply_section<C>( &self, section: SimpleSection<'_, C> ) -> Result<SimpleValue, Box<dyn Error + Sync + Send>>
where C: ContentSequence,

source§

fn render_notnone_section<C, E, IC>( &self, _section: Section<'_, C>, _encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

impl<T, const N: usize> Content for [T; N]
where T: Content,

source§

fn is_truthy(&self) -> bool

source§

fn render_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_notnone_section<C, E, IC>( &self, _section: Section<'_, C>, _encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

impl<T, const N: usize> Content for ArrayVec<T, N>
where T: Content,

source§

fn is_truthy(&self) -> bool

source§

fn render_section<C, E, IC>( &self, section: Section<'_, C>, encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

source§

fn render_notnone_section<C, E, IC>( &self, _section: Section<'_, C>, _encoder: &mut E, _content: Option<&IC> ) -> Result<(), <E as Encoder>::Error>
where C: ContentSequence, E: Encoder,

Implementors§

source§

impl Content for EmptyObject

source§

impl Content for SortModel

source§

impl<T> Content for PageDto<T>
where T: Content,

source§

impl<T> Content for Pagination<T>
where T: Content,

source§

impl<T> Content for Value<T>
where T: Content,