pub struct EquationRef {
pub target: String,
pub format: Option<String>,
}Expand description
An equation reference mark for cross-referencing equations.
Used inline to reference equations defined in equation groups.
§Example JSON
{
"type": "text",
"value": "(2.5)",
"marks": [
{
"type": "academic:equation-ref",
"target": "#eq-fx",
"format": "({number})"
}
]
}Fields§
§target: StringContent Anchor URI to the equation (e.g., “#eq-fx”).
format: Option<String>Display format with placeholder (default: “({number})”).
Implementations§
Source§impl EquationRef
impl EquationRef
Sourcepub fn with_format(self, format: impl Into<String>) -> Self
pub fn with_format(self, format: impl Into<String>) -> Self
Set a custom format string.
Use {number} as a placeholder for the equation number.
Sourcepub fn to_extension_mark(&self) -> ExtensionMark
pub fn to_extension_mark(&self) -> ExtensionMark
Convert to an extension mark for use in text.
Trait Implementations§
Source§impl Clone for EquationRef
impl Clone for EquationRef
Source§fn clone(&self) -> EquationRef
fn clone(&self) -> EquationRef
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EquationRef
impl Debug for EquationRef
Source§impl<'de> Deserialize<'de> for EquationRef
impl<'de> Deserialize<'de> for EquationRef
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
Source§impl PartialEq for EquationRef
impl PartialEq for EquationRef
Source§impl Serialize for EquationRef
impl Serialize for EquationRef
impl Eq for EquationRef
impl StructuralPartialEq for EquationRef
Auto Trait Implementations§
impl Freeze for EquationRef
impl RefUnwindSafe for EquationRef
impl Send for EquationRef
impl Sync for EquationRef
impl Unpin for EquationRef
impl UnsafeUnpin for EquationRef
impl UnwindSafe for EquationRef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.