pub enum BookPage {
Text {
text: String,
},
Spotlight {
item: ItemDef,
title: Option<String>,
text: Option<String>,
},
Crafting {
recipe_id: String,
text: Option<String>,
},
Smelting {
recipe_id: String,
text: Option<String>,
},
Image {
texture: String,
title: Option<String>,
text: Option<String>,
border: bool,
},
Entity {
entity_type: String,
name: Option<String>,
text: Option<String>,
},
Relations {
entries: Vec<String>,
text: Option<String>,
},
Empty,
Pattern {
op_id: String,
anchor: String,
input: String,
output: String,
text: String,
},
Svg {
data: String,
title: Option<String>,
text: Option<String>,
},
CustomText {
text: String,
font: BookFont,
color: u32,
},
}Expand description
A single page variant inside a book entry.
Variants§
Text
Plain formatted text (Patchouli-style).
Spotlight
Display an item outlined (tooltip on hover).
Crafting
Crafting recipe display (autorenders 3×3 grid).
Smelting
Smelting recipe display.
Image
Image overlay page.
Entity
Entity display page (renders a living entity in a box).
Relations
Link to another entry (like Patchouli’s relations).
Empty
Empty separator.
Pattern
Custom pattern page for Hexcasting-style mods (like hexcasting:pattern).
Svg
SVG image page — rasterized at render time via resvg.
CustomText
Text rendered with a custom TTF/OTF font.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BookPage
impl<'de> Deserialize<'de> for BookPage
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BookPage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BookPage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for BookPage
impl Serialize for BookPage
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for BookPage
impl RefUnwindSafe for BookPage
impl Send for BookPage
impl Sync for BookPage
impl Unpin for BookPage
impl UnsafeUnpin for BookPage
impl UnwindSafe for BookPage
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
Mutably borrows from an owned value. Read more