pub struct Theorem {
pub id: Option<String>,
pub variant: TheoremVariant,
pub label: Option<String>,
pub number: Option<String>,
pub children: Vec<Block>,
pub attribution: Option<String>,
pub citation: Option<String>,
pub uses: Option<Vec<String>>,
pub restate: Option<bool>,
}Expand description
A theorem-like block (theorem, lemma, proposition, etc.).
Fields§
§id: Option<String>Optional unique identifier for cross-referencing.
variant: TheoremVariantType of theorem-like statement.
label: Option<String>Optional label/title for the theorem.
number: Option<String>Theorem number (e.g., “3.1”, “A.2”).
children: Vec<Block>Statement content.
attribution: Option<String>Attribution (e.g., “Euclid”, “Fermat”).
citation: Option<String>Citation reference.
uses: Option<Vec<String>>Content Anchor URIs of theorems this depends on.
restate: Option<bool>Whether this restates an existing theorem.
Implementations§
Source§impl Theorem
impl Theorem
Sourcepub fn new(variant: TheoremVariant, children: Vec<Block>) -> Self
pub fn new(variant: TheoremVariant, children: Vec<Block>) -> Self
Create a new theorem.
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Set the label.
Sourcepub fn with_number(self, number: impl Into<String>) -> Self
pub fn with_number(self, number: impl Into<String>) -> Self
Set the number.
Sourcepub fn with_attribution(self, attribution: impl Into<String>) -> Self
pub fn with_attribution(self, attribution: impl Into<String>) -> Self
Set attribution.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Theorem
impl<'de> Deserialize<'de> for Theorem
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 Theorem
Auto Trait Implementations§
impl Freeze for Theorem
impl RefUnwindSafe for Theorem
impl Send for Theorem
impl Sync for Theorem
impl Unpin for Theorem
impl UnsafeUnpin for Theorem
impl UnwindSafe for Theorem
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