Trait skyline_web::traits::ContentSequence
source · pub trait ContentSequence: Combine + Sized + Copy {
fn render_field_escaped<E>(
&self,
_hash: u64,
_name: &str,
_encoder: &mut E
) -> Result<(), <E as Encoder>::Error>
where
E: Encoder,
{ ... }
fn render_field_unescaped<E>(
&self,
_hash: u64,
_name: &str,
_encoder: &mut E
) -> Result<(), <E as Encoder>::Error>
where
E: Encoder,
{ ... }
fn render_field_section<P, E, 'section>(
&self,
_hash: u64,
_name: &str,
_section: Section<'section, P>,
_encoder: &mut E
) -> Result<(), <E as Encoder>::Error>
where
P: ContentSequence,
E: Encoder,
{ ... }
fn render_field_inverse<P, E, 'section>(
&self,
_hash: u64,
_name: &str,
_section: Section<'section, P>,
_encoder: &mut E
) -> Result<(), <E as Encoder>::Error>
where
P: ContentSequence,
E: Encoder,
{ ... }
}
Expand description
Helper trait that re-exposes render_field_x
methods of a Content
trait,
calling those methods internally on all Content
s contained within Self
.
Provided Methods
sourcefn render_field_escaped<E>(
&self,
_hash: u64,
_name: &str,
_encoder: &mut E
) -> Result<(), <E as Encoder>::Error>where
E: Encoder,
fn render_field_escaped<E>(
&self,
_hash: u64,
_name: &str,
_encoder: &mut E
) -> Result<(), <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 <
.
sourcefn render_field_unescaped<E>(
&self,
_hash: u64,
_name: &str,
_encoder: &mut E
) -> Result<(), <E as Encoder>::Error>where
E: Encoder,
fn render_field_unescaped<E>(
&self,
_hash: u64,
_name: &str,
_encoder: &mut E
) -> Result<(), <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.