pub enum BookPage {
Text {
text: String,
title: Option<String>,
font: Option<String>,
font_size: Option<f32>,
},
Spotlight {
item: String,
title: Option<String>,
text: Option<String>,
},
Recipe {
recipe: String,
text: Option<String>,
},
Image {
texture: String,
title: Option<String>,
text: Option<String>,
},
Entity {
entity: String,
name: Option<String>,
text: Option<String>,
},
Multiblock {
name: Option<String>,
pattern: Vec<Vec<String>>,
mapping: BTreeMap<String, String>,
text: Option<String>,
},
Relations {
entries: Vec<String>,
text: Option<String>,
},
Pattern {
op_id: String,
name: Option<String>,
input: String,
output: String,
text: String,
patterns: Vec<HexPattern>,
},
Empty,
}Expand description
One page of an entry: {"type": "spotlight", "item": "minecraft:stick", …}.
Variants§
Text
Text (Yog text: {b|…}, {#rrggbb|…}, {link=…|…}), with an
optional title; in another font (a resource-pack font id, e.g. a
ttf provider) at font_size pixels a line.
Spotlight
An item in a frame, its name (or title) and text.
Recipe
A recipe as its station shows it (a crafting grid, a furnace, …).
Image
An image (a Yog image source: a texture, .svg too).
Entity
A living entity, turning slowly.
Multiblock
A structure in 3D, turning: pattern is its layers top to bottom,
each a list of rows; each character stands for the block mapping
gives it (a block state: minecraft:furnace[facing=north]), for air.
Fields
Relations
Links to other entries.
Pattern
A spell pattern: its name, what it takes and gives, the pattern
itself on a hexagonal grid (see pattern).
Fields
patterns: Vec<HexPattern>The patterns drawn on the page (none: just the texts).
Empty
Nothing (to start the next on a new spread).
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>,
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,
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> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.