Skip to main content

ViewInteractive

Struct ViewInteractive 

Source
pub struct ViewInteractive {
    pub enabled: Option<bool>,
    pub search: Option<bool>,
    pub page_size: Option<usize>,
    pub max_enum: Option<usize>,
    pub filters: BTreeMap<String, String>,
    pub sortable: BTreeMap<String, bool>,
    pub sort_as: BTreeMap<String, String>,
    pub default_sort: Vec<SortKey>,
    pub unknown: BTreeMap<String, Value>,
}
Expand description

docgen-specific per-view interactive overrides (docgenInteractive: { ... }). Everything is optional and Obsidian-tolerant (unknown keys ignored).

Fields§

§enabled: Option<bool>

Explicitly enable/disable the island for this view (M3 host gating).

§search: Option<bool>

Show the free-text search box (default: true).

§page_size: Option<usize>

Rows per page (pageSize). 0 = no pagination.

§max_enum: Option<usize>

Enum-vs-text cardinality threshold (maxEnum, default 40).

§filters: BTreeMap<String, String>

Per-column filter widget override: col → none|text|enum|date|number|boolean.

§sortable: BTreeMap<String, bool>

Per-column sortable override: col → bool.

§sort_as: BTreeMap<String, String>

Per-column sort-order override: col → text|semver.

A column whose values all parse as versions sorts as versions automatically; text opts back out to plain string order, and semver forces version order on a column that would not be detected (values that then fail to parse sort last). Unlike the rest of this struct, this also applies to the static build — a view’s sort: is a build-time ordering.

§default_sort: Vec<SortKey>

Initial sort override (defaultSort).

§unknown: BTreeMap<String, Value>

Any key here docgen does not recognize. Unlike the Obsidian-owned parts of the format — where an unknown property is forgiving by design — this block is docgen’s OWN namespace, so a key in it that docgen ignores is always an author mistake. Captured rather than dropped so the renderer can say so; see ViewInteractive::unknown_key_warning.

Implementations§

Source§

impl ViewInteractive

Source

pub fn unknown_key_warning(&self) -> Option<String>

A human message naming every unrecognized key, or None when clean.

These keys are camelCase, so the overwhelmingly likely typo is a case slip (pagesize, defaultsort) — match case-insensitively to name the intended key. Anything else is reported without a guess rather than with a wrong one.

Trait Implementations§

Source§

impl Clone for ViewInteractive

Source§

fn clone(&self) -> ViewInteractive

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 ViewInteractive

Source§

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

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

impl Default for ViewInteractive

Source§

fn default() -> ViewInteractive

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

impl<'de> Deserialize<'de> for ViewInteractive

Source§

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

Deserialize this value from the given Serde deserializer. 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> 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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.