pub struct ParsedImage {
pub src: String,
pub alt: String,
pub width: i64,
pub height: i64,
}Expand description
An inline image recovered by a parser, before it becomes an ImageAnchor.
src is whatever the source document pointed at — a relative path, a bare
name, a URL. Parsers do not resolve it; that is the embedding application’s
job, and this crate never touches the filesystem.
Fields§
§src: String§alt: String§width: i64Display size in pixels, 0 when the source did not state one.
Djot and HTML both carry these as attributes ({width=800},
<img width=…>); Markdown has no syntax for them, so a Markdown import
leaves both zero and the caller supplies intrinsic dimensions.
height: i64Trait Implementations§
Source§impl Clone for ParsedImage
impl Clone for ParsedImage
Source§fn clone(&self) -> ParsedImage
fn clone(&self) -> ParsedImage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ParsedImage
impl Debug for ParsedImage
Source§impl Default for ParsedImage
impl Default for ParsedImage
Source§fn default() -> ParsedImage
fn default() -> ParsedImage
Returns the “default value” for a type. Read more
impl Eq for ParsedImage
Source§impl PartialEq for ParsedImage
impl PartialEq for ParsedImage
impl StructuralPartialEq for ParsedImage
Auto Trait Implementations§
impl Freeze for ParsedImage
impl RefUnwindSafe for ParsedImage
impl Send for ParsedImage
impl Sync for ParsedImage
impl Unpin for ParsedImage
impl UnsafeUnpin for ParsedImage
impl UnwindSafe for ParsedImage
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