pub struct AssetPathSpan {
pub path: String,
pub attrs: String,
pub quote: Option<char>,
pub value: Range<usize>,
pub outer: Range<usize>,
pub container: PathContainer,
}Expand description
An asset path that occupies a span with NO markdown reference syntax around it.
§Contract
A rename replaces value with render_bare_value(container, quote, path, attrs); a delete removes outer. attrs is the |attrs suffix that
lives INSIDE value — it is empty when the author’s attrs sit outside it
(|cover, where the attrs follow the closing paren), so
re-rendering never duplicates or drops them.
Fields§
§path: StringDecoded and trimmed: no quotes, no |attrs, no [[ ]].
attrs: StringThe |attrs suffix inside value, or "" — rebuilt verbatim.
quote: Option<char>Quote character the value was wrapped in, if any.
value: Range<usize>Span a RENAME rewrites — the whole value, quotes included.
outer: Range<usize>Span a DELETE removes — the whole gallery/frontmatter line
(including its terminator) or the whole key=value attr item.
container: PathContainerWhere the path was found.
Trait Implementations§
Source§impl Clone for AssetPathSpan
impl Clone for AssetPathSpan
Source§fn clone(&self) -> AssetPathSpan
fn clone(&self) -> AssetPathSpan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AssetPathSpan
impl Debug for AssetPathSpan
impl Eq for AssetPathSpan
Source§impl PartialEq for AssetPathSpan
impl PartialEq for AssetPathSpan
impl StructuralPartialEq for AssetPathSpan
Auto Trait Implementations§
impl Freeze for AssetPathSpan
impl RefUnwindSafe for AssetPathSpan
impl Send for AssetPathSpan
impl Sync for AssetPathSpan
impl Unpin for AssetPathSpan
impl UnsafeUnpin for AssetPathSpan
impl UnwindSafe for AssetPathSpan
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
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
key and return true if they are equal.