Struct dysql_core::EmptyObject

source ·
pub struct EmptyObject;

Trait Implementations§

source§

impl Clone for EmptyObject

source§

fn clone(&self) -> EmptyObject

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Content for EmptyObject

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_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,

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,

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,

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,

Render a field by the hash or string of its name. Read more
source§

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,

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<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,

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,

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

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,

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,

Renders self as a variable to the encoder. Read more
source§

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

Apply self as a variable. Read more
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§

impl Debug for EmptyObject

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for EmptyObject

§

type Target = ()

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.