pub struct BookEntry {
pub id: String,
pub name: String,
pub category: String,
pub pages: Vec<BookPage>,
pub icon: Option<String>,
pub icon_svg: Option<String>,
pub secret: bool,
pub priority: i32,
pub read_by_default: bool,
pub advancement: Option<String>,
}Expand description
One entry in a book (like a “page” in the TOC sidebar).
Fields§
§id: String§name: String§category: String§pages: Vec<BookPage>§icon: Option<String>Entry icon (item id or texture path).
icon_svg: Option<String>Raw SVG icon string (takes priority over icon).
secret: boolIf true, hides from the book (used for unlocks).
priority: i32Sort priority (lower = first).
read_by_default: boolIf true, read by default when opening the book.
advancement: Option<String>Advancement required to unlock.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BookEntry
impl<'de> Deserialize<'de> for BookEntry
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BookEntry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BookEntry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for BookEntry
impl Serialize for BookEntry
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 BookEntry
impl RefUnwindSafe for BookEntry
impl Send for BookEntry
impl Sync for BookEntry
impl Unpin for BookEntry
impl UnsafeUnpin for BookEntry
impl UnwindSafe for BookEntry
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