pub struct Fragment {
pub concept: Concept,
pub key: &'static str,
pub variant: Variant,
pub depth: Depth,
pub locale: &'static str,
pub audience: Option<Audience>,
pub rank: u8,
pub title: Option<&'static str>,
pub body: &'static str,
}Expand description
A unit of content, addressed by (concept, key, variant, locale).
Fields§
§concept: ConceptConcept this fragment belongs to.
key: &'static strSub-topic within the concept, e.g. "no-word-splitting".
variant: VariantHow this fragment renders its idea.
depth: DepthSummary fragments always show; Reference only at reference depth.
locale: &'static strBCP-47 locale tag. English ("en") is the canonical-complete base.
audience: Option<Audience>None = shared (default); Some(_) = audience-specific divergence.
rank: u8Importance rank for the always-on onboarding block: 0 is the most
important, and composition renders fragments in ascending rank so the
client model meets the critical rules first even under skimming or
truncation. Fragments at UNRANKED (the default) keep registry order.
The rank is a property of the (concept, key, variant) slot, so it is
locale-agnostic — a translation of a fragment inherits the same rank.
title: Option<&'static str>Optional section heading for reference rendering (e.g. "Quoting").
None for inline fragments (the Foundations spine renders under its
concept header instead). Used by render_syntax_reference.
body: &'static strMarkdown body.
Implementations§
Auto Trait Implementations§
impl Freeze for Fragment
impl RefUnwindSafe for Fragment
impl Send for Fragment
impl Sync for Fragment
impl Unpin for Fragment
impl UnsafeUnpin for Fragment
impl UnwindSafe for Fragment
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> Pointable for T
impl<T> Pointable for T
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
WrappingSpan::make_wrapped to wrap an AST node in a span.