Struct dysql_core::Value
source · pub struct Value<T> {
pub value: T,
}
Fields§
§value: T
Implementations§
Trait Implementations§
source§impl<T> Content for Value<T>where
T: Content,
impl<T> Content for Value<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
Auto Trait Implementations§
impl<T> Freeze for Value<T>where
T: Freeze,
impl<T> RefUnwindSafe for Value<T>where
T: RefUnwindSafe,
impl<T> Send for Value<T>where
T: Send,
impl<T> Sync for Value<T>where
T: Sync,
impl<T> Unpin for Value<T>where
T: Unpin,
impl<T> UnwindSafe for Value<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