Skip to main content

Options

Struct Options 

Source
pub struct Options {
Show 23 fields pub init: bool, pub summary: bool, pub book_root: String, pub markdown_root: String, pub summary_path: String, pub book: Option<String>, pub mdbook_out: Option<String>, pub title: Option<String>, pub ignore_git: bool, pub layout: Layout, pub search_paths: Vec<PathBuf>, pub escape_tags: EscapeTags, pub link_format: Option<String>, pub no_proto_markdown: bool, pub no_proto_highlight: bool, pub no_cel_highlight: bool, pub explicit_markdown_root: bool, pub explicit_summary_path: bool, pub explicit_book_root: bool, pub alphabetize_services: bool, pub alphabetize_messages: bool, pub openapi_operation_source: OpenApiOperationSource, pub openapi_summary_label: OpenApiSummaryLabel,
}
Expand description

Spine options shared across renderers (subset ported from protobuf-mdbook).

Passed to Contract::link_context and renderers at output time. In-memory configuration only.

Fields§

§init: bool

When true, emit initial book scaffolding (SUMMARY, directories).

§summary: bool

When true, regenerate the mdBook SUMMARY.md.

§book_root: String

Root directory of the mdBook project.

§markdown_root: String

Relative path from book_root to generated markdown pages.

§summary_path: String

Relative path from book_root to SUMMARY.md.

§book: Option<String>

Optional mdBook book title override.

§mdbook_out: Option<String>

Optional output directory for the built book.

§title: Option<String>

Optional title override for the reference manual.

§ignore_git: bool

When true, skip git-based provenance checks.

§layout: Layout

Page layout strategy for generated markdown.

§search_paths: Vec<PathBuf>

Extra filesystem paths searched when resolving links or companions.

§escape_tags: EscapeTags

How to escape HTML-like tags in prose comments.

§link_format: Option<String>

Selected link formatter name (default mdbook-relative).

§no_proto_markdown: bool

When true, skip copying companion proto markdown files.

§no_proto_highlight: bool

When true, skip protobuf syntax highlighting in init scaffold.

§no_cel_highlight: bool

When true, skip CEL syntax highlighting in init scaffold.

§explicit_markdown_root: bool

Set when markdown_root= appears in plugin options (preserved under book=).

§explicit_summary_path: bool

Set when summary_path= appears in plugin options (preserved under book=).

§explicit_book_root: bool

Set when book_root= appears in plugin options (preserved under book=).

§alphabetize_services: bool

When true, sort package-layout Services headings by entity title (mdBook).

§alphabetize_messages: bool

When true, sort package-layout Messages and enums headings by entity title (mdBook).

§openapi_operation_source: OpenApiOperationSource

How to render raw OpenAPI operation source on operation pages.

§openapi_summary_label: OpenApiSummaryLabel

How to label OpenAPI operations in SUMMARY and index navigation.

Implementations§

Source§

impl Options

Default link formatter name.

Source

pub fn output_path(&self, rel: &str) -> String

Join book_root with a relative output path.

Source

pub fn proto_highlight(&self) -> bool

Returns true when protobuf highlight preprocessor should be configured.

Source

pub fn cel_highlight(&self) -> bool

Returns true when CEL highlight preprocessor should be configured.

Source

pub fn render_summary(&self) -> bool

Returns true when a SUMMARY file should be rendered (summary or init).

Source

pub fn package_only_summary(&self) -> bool

Returns true when only package-level SUMMARY entries are needed (init mode).

Trait Implementations§

Source§

impl Clone for Options

Source§

fn clone(&self) -> Options

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Options

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Options

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for Options

Source§

impl PartialEq for Options

Source§

fn eq(&self, other: &Options) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Options

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.