Skip to main content

OverlayFile

Struct OverlayFile 

Source
pub struct OverlayFile {
    pub overlay: u32,
    pub system_prompt: Option<String>,
    pub mount: Vec<OverlayMount>,
    pub unmount: Vec<String>,
    pub bind: HashMap<String, HashMap<String, Value>>,
}
Expand description

A parsed overlay document.

deny_unknown_fields is load-bearing rather than tidiness: it is what makes an unsupported key a loud failure instead of a patch that silently does less than it appears to. Someone reasonably assuming that, say, a tier override belongs here finds out immediately.

Fields§

§overlay: u32

Version of this document format. Unrelated to warble_ir_version — an overlay adds no IR field, so it never moves the IR line and is deliberately not part of that lockstep.

§system_prompt: Option<String>

Replaces the profile’s charter wholesale.

§mount: Vec<OverlayMount>

Behaviors to add.

§unmount: Vec<String>

Behaviors to remove, by id.

§bind: HashMap<String, HashMap<String, Value>>

Values to change on an already-mounted behavior, keyed by its id. Merged key by key into whatever the base profile supplied, so changing one value cannot silently drop the others — including a value the component declares as required.

Trait Implementations§

Source§

impl Debug for OverlayFile

Source§

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

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

impl<'de> Deserialize<'de> for OverlayFile

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> 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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.