Struct operator::content::RenderData
source · [−]pub struct RenderData<ServerInfo: Clone + Serialize> {
pub index: ContentIndex,
pub server_info: ServerInfo,
pub target_media_type: Option<MediaType>,
pub request: RequestData,
pub error_code: Option<u16>,
}
Expand description
Data passed to handlebars templates and executables.
Fields serialize into kebab-case (e.g. server_info
becomes server-info
).
Fields
index: ContentIndex
A hierarchial index of the content. This is serialized with the name
/
(with handlebars escaping this looks like [/].[foo/].bar
).
server_info: ServerInfo
Metadata about the server, such as its version.
target_media_type: Option<MediaType>
The best MediaType
as determined by content negotiation. Rendering
must emit content in this media type.
request: RequestData
Data that comes from requests.
error_code: Option<u16>
An HTTP 4xx
or 5xx
status code
indicating that something went wrong. This will be set while rendering
content for the --error-handler-route
.
Trait Implementations
sourceimpl<ServerInfo: Clone + Clone + Serialize> Clone for RenderData<ServerInfo>
impl<ServerInfo: Clone + Clone + Serialize> Clone for RenderData<ServerInfo>
sourcefn clone(&self) -> RenderData<ServerInfo>
fn clone(&self) -> RenderData<ServerInfo>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<ServerInfo> RefUnwindSafe for RenderData<ServerInfo> where
ServerInfo: RefUnwindSafe,
impl<ServerInfo> Send for RenderData<ServerInfo> where
ServerInfo: Send,
impl<ServerInfo> Sync for RenderData<ServerInfo> where
ServerInfo: Sync,
impl<ServerInfo> Unpin for RenderData<ServerInfo> where
ServerInfo: Unpin,
impl<ServerInfo> UnwindSafe for RenderData<ServerInfo> where
ServerInfo: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more