pub struct Infobox {
pub name: Option<String>,
pub infobox_type: InfoboxType,
pub value: Option<String>,
pub has_parts: Option<Vec<InfoboxPart>>,
pub links: Option<Vec<Link>>,
pub images: Option<Vec<Image>>,
}Expand description
Infobox structured content.
Infoboxes are structured data boxes displayed on article pages. Common examples include taxoboxes for species, person infoboxes for biographies, and infoboxes for cities, films, etc.
Infoboxes have a tree-like structure with nested parts for complex data.
§Example
ⓘ
use wme_models::Infobox;
// An infobox might contain:
// - Name: "Automatic taxobox"
// - Type: Infobox
// - Parts: [
// { name: "Kingdom:", type: "field", value: "Animalia" },
// { name: "Phylum:", type: "field", value: "Chordata" }
// ]Fields§
§name: Option<String>Infobox name (e.g., “Automatic taxobox”)
infobox_type: InfoboxTypeInfobox type
value: Option<String>Value (for field types)
has_parts: Option<Vec<InfoboxPart>>Nested parts (for complex infoboxes)
links: Option<Vec<Link>>Links within infobox
images: Option<Vec<Image>>Images within infobox
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Infobox
impl<'de> Deserialize<'de> for Infobox
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Infobox
Auto Trait Implementations§
impl Freeze for Infobox
impl RefUnwindSafe for Infobox
impl Send for Infobox
impl Sync for Infobox
impl Unpin for Infobox
impl UnsafeUnpin for Infobox
impl UnwindSafe for Infobox
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