pub struct Comment(pub String);Tuple Fields§
§0: StringTrait Implementations§
Source§impl BoxOps for Comment
impl BoxOps for Comment
Source§fn get_properties(&self) -> &HashMap<Stored>
fn get_properties(&self) -> &HashMap<Stored>
deprecated: get the map of named properties. This can not be usable as long as we have any
data behind a RefCell wrapper.
Use
with_properties instead.Source§fn with_properties<R, FnR>(&self, caller: FnR) -> R
fn with_properties<R, FnR>(&self, caller: FnR) -> R
execute a function using this object’s named properties
Source§fn get_property(&self, key: &str) -> Option<Cow<'_, Stored>>
fn get_property(&self, key: &str) -> Option<Cow<'_, Stored>>
get a single named property (with special “isSpace” check)
Source§fn set_property<T: Into<Stored>>(&mut self, _key: &str, _value: T)
fn set_property<T: Into<Stored>>(&mut self, _key: &str, _value: T)
set a named property (allows all
Stored types for values)Source§fn get_string(&self) -> Result<Cow<'_, str>>
fn get_string(&self) -> Result<Cow<'_, str>>
build a string representation of the underlying digested data
Source§fn be_absorbed(&self, document: &mut Document) -> Result<Vec<Node>>
fn be_absorbed(&self, document: &mut Document) -> Result<Vec<Node>>
absorb the current object into the
Document XML - returning the corresponding nodesSource§fn get_width(
&self,
_options: Option<HashMap<Stored>>,
) -> Result<Option<RegisterValue>>
fn get_width( &self, _options: Option<HashMap<Stored>>, ) -> Result<Option<RegisterValue>>
gets the “width” property value, if any
Source§fn compute_size(
&self,
_options: HashMap<Stored>,
) -> Result<(Dimension, Dimension, Dimension)>
fn compute_size( &self, _options: HashMap<Stored>, ) -> Result<(Dimension, Dimension, Dimension)>
computes and returns the size of a box-like object
Source§fn unlist(&self) -> Vec<Digested>
fn unlist(&self) -> Vec<Digested>
If composite, unwrap into the contained digested objects (or return self)
fn unlist_ref(&self) -> Vec<Cow<'_, Digested>>
Source§fn be_absorbed_mut(&mut self, _document: &mut Document) -> Result<Vec<Node>>
fn be_absorbed_mut(&mut self, _document: &mut Document) -> Result<Vec<Node>>
be_absorbed but with allowed side-effects on the carrier (for
Alignment only)Source§fn get_tokens(&self) -> Option<&Tokens>
fn get_tokens(&self) -> Option<&Tokens>
get the underlying tokens (preceding digestion)
Source§fn get_properties_mut(&mut self) -> &mut HashMap<Stored>
fn get_properties_mut(&mut self) -> &mut HashMap<Stored>
get a mutable reference to the map of named properties
Source§fn set_memo_property<T: Into<Stored>>(&mut self, key: &str, value: T)
fn set_memo_property<T: Into<Stored>>(&mut self, key: &str, value: T)
BoxOps::set_property for a memo — a value the box can compute again — which a box busy elsewhere (being
absorbed) does without, where Perl’s plain hash store (Box.pm:294-296) always lands.fn get_property_string(&self, key: &str) -> String
Source§fn get_property_mut(&mut self, key: &str) -> Option<&mut Stored>
fn get_property_mut(&mut self, key: &str) -> Option<&mut Stored>
get a mutable reference to a single named property (does NOT have the “isSpace” check)
Source§fn has_property(&self, key: &str) -> bool
fn has_property(&self, key: &str) -> bool
checks if a property key has been set
Source§fn get_property_bool(&self, key: &str) -> bool
fn get_property_bool(&self, key: &str) -> bool
obtains a boolean property value (false unless
Stored::Bool)Source§fn get_body(&self) -> Result<Option<Digested>>
fn get_body(&self) -> Result<Option<Digested>>
obtains the “body” of a digested object which captured it
Source§fn set_height<T: Into<Stored>>(&mut self, width: T)
fn set_height<T: Into<Stored>>(&mut self, width: T)
sets a “height” property value, for sizing
Source§fn get_height(&self) -> Option<RegisterValue>
fn get_height(&self) -> Option<RegisterValue>
gets the “height” property value, if any.
Checks “height”, then “cached_height”, then computes from font if needed.
Source§fn get_depth(&self) -> Option<RegisterValue>
fn get_depth(&self) -> Option<RegisterValue>
gets the “depth” property value, if any.
Checks “depth”, then “cached_depth”, then computes from font if needed.
Source§fn get_size(
&mut self,
options: Option<HashMap<Stored>>,
) -> Result<(Dimension, Dimension, Dimension, Dimension, Dimension, Dimension)>
fn get_size( &mut self, options: Option<HashMap<Stored>>, ) -> Result<(Dimension, Dimension, Dimension, Dimension, Dimension, Dimension)>
gets the box size as a triple of (width, height, depth)
the generic implementation is immutable and will recompute the size on each call
see
Digested::get_size for a variant with interior mutability which caches the box sizeSource§fn compute_size_and_cache(
&mut self,
options: HashMap<Stored>,
) -> Result<(Dimension, Dimension, Dimension)>
fn compute_size_and_cache( &mut self, options: HashMap<Stored>, ) -> Result<(Dimension, Dimension, Dimension)>
computes and caches (via named properties) the size of a box-like object,
Perl’s
computeSizeStore (Box.pm:266-297). A box whose size is completely
specified keeps that size, and its contents are not measured (:275-281):
width, height and depth all given, a space’s width, or a vertical space’s
height or depth. A pgf picture declares its size, and sizing a box that
holds one walked every drawing box of it (pgf-spectraPreviewDataLSE, 56kq).
Perl #2798 (S5, padding slice): the size then takes any requested
pad{top,bottom,left,right} (display math
\abovedisplayskip/\belowdisplayskip, \overline/\underline 2pt,
items/equations). Not ported: a partly specified size keeping its given
parts over the computed ones, and isEmpty — a mechanical port of those
regressed (Rust boxes don’t use width/height/depth uniformly as “requested
box size”; docs/archive/UPSTREAM_SYNC_2767_to_2833_2026-06-26.md, U2 and
slice S5); tracked with K18 in docs/SYNC_STATUS.md.impl Eq for Comment
Source§impl Object for Comment
impl Object for Comment
Source§fn revert(&self) -> Result<Tokens>
fn revert(&self) -> Result<Tokens>
each concrete object needs to provide its own path back to tokens
fn stringify(&self) -> String
fn isa_box(&self) -> bool
fn is_expandable(&self) -> bool
fn is_definition(&self) -> bool
fn is_comment(&self) -> bool
fn be_digested(self) -> Result<Digested>
Source§fn get_locator(&self) -> Option<Locator>
fn get_locator(&self) -> Option<Locator>
The object’s stored source locator, if it has one.
None is the honest
“no recorded source position” (replacing the old Locator::default()
file!()/line!() sentinel). For “where the parser is now” (error
reporting, box creation), use the free fn gullet::get_locator().Source§fn get_origin(&self) -> DefinitionOrigin
fn get_origin(&self) -> DefinitionOrigin
Who made this definition (K1 provenance,
definition::origin). The
default is Unknown, which counts as LaTeXML’s own.impl StructuralPartialEq for Comment
Auto Trait Implementations§
impl Freeze for Comment
impl RefUnwindSafe for Comment
impl Send for Comment
impl Sync for Comment
impl Unpin for Comment
impl UnsafeUnpin for Comment
impl UnwindSafe for Comment
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more