Struct mdbook::config::Search

source ·
pub struct Search {
    pub enable: bool,
    pub limit_results: u32,
    pub teaser_word_count: u32,
    pub use_boolean_and: bool,
    pub boost_title: u8,
    pub boost_hierarchy: u8,
    pub boost_paragraph: u8,
    pub expand: bool,
    pub heading_split_level: u8,
    pub copy_js: bool,
}
Expand description

Configuration of the search functionality of the HTML renderer.

Fields§

§enable: bool

Enable the search feature. Default: true.

§limit_results: u32

Maximum number of visible results. Default: 30.

§teaser_word_count: u32

The number of words used for a search result teaser. Default: 30.

§use_boolean_and: bool

Define the logical link between multiple search words. If true, all search words must appear in each result. Default: false.

§boost_title: u8

Boost factor for the search result score if a search word appears in the header. Default: 2.

§boost_hierarchy: u8

Boost factor for the search result score if a search word appears in the hierarchy. The hierarchy contains all titles of the parent documents and all parent headings. Default: 1.

§boost_paragraph: u8

Boost factor for the search result score if a search word appears in the text. Default: 1.

§expand: bool

True if the searchword micro should match microwave. Default: true.

§heading_split_level: u8

Documents are split into smaller parts, separated by headings. This defines, until which level of heading documents should be split. Default: 3. (### This is a level 3 heading)

§copy_js: bool

Copy JavaScript files for the search functionality to the output directory? Default: true.

Trait Implementations§

source§

fn clone(&self) -> Search

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

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

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

fn default() -> Search

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

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> 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,

§

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>,

§

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>,

§

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.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,