pub(crate) struct ContextInfo {
pub(super) render_redirect_pages: bool,
pub(crate) include_sources: bool,
pub(crate) is_inside_inlined_module: bool,
}
Expand description
This struct contains the information that needs to be reset between each
FormatRenderer::item
call.
When we enter a new module, we set these values for the whole module but they might be updated in each child item (especially if it’s a module). So to prevent these changes to impact other items rendering in the same module, we need to reset them to the module’s set values.
Fields§
§render_redirect_pages: bool
A flag, which when true
, will render pages which redirect to the
real location of an item. This is used to allow external links to
publicly reused items to redirect to the right location.
include_sources: bool
This flag indicates whether source links should be generated or not. If
the source files are present in the html rendering, then this will be
true
.
is_inside_inlined_module: bool
Field used during rendering, to know if we’re inside an inlined item.
Implementations§
Trait Implementations§
Source§impl Clone for ContextInfo
impl Clone for ContextInfo
Source§fn clone(&self) -> ContextInfo
fn clone(&self) -> ContextInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreimpl Copy for ContextInfo
Auto Trait Implementations§
impl Freeze for ContextInfo
impl RefUnwindSafe for ContextInfo
impl Send for ContextInfo
impl Sync for ContextInfo
impl Unpin for ContextInfo
impl UnwindSafe for ContextInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 3 bytes