pub struct SourceElement {
pub tag: String,
pub id: Option<String>,
pub class: Option<String>,
pub attrs: Vec<(String, String)>,
pub path: String,
}Expand description
An element of the source that is not a block but carries an id or a
class (#910): a container — the <div id="art_23"> an article’s
paragraphs sit in — so an excerpt selected by a container’s identity
resolves to a path and, through ItemTree::blocks_under, to the blocks
inside it. A block’s own identity is on the block.
Fields§
§tag: StringThe element’s tag name.
id: Option<String>Its id attribute, when it has one.
class: Option<String>Its class attribute, as written.
attrs: Vec<(String, String)>Every attribute, by name.
path: StringIts path from the document root, as SourceBlock::path.
Trait Implementations§
Source§impl Clone for SourceElement
impl Clone for SourceElement
Source§impl Debug for SourceElement
impl Debug for SourceElement
impl Eq for SourceElement
Source§impl PartialEq for SourceElement
impl PartialEq for SourceElement
impl StructuralPartialEq for SourceElement
Auto Trait Implementations§
impl Forget for SourceElement
impl Freeze for SourceElement
impl Move for SourceElement
impl RefUnwindSafe for SourceElement
impl Send for SourceElementwhere
RawVecInner: Send,
impl Sync for SourceElementwhere
RawVecInner: Sync,
impl Unpin for SourceElement
impl UnsafeUnpin for SourceElementwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
impl UnwindSafe for SourceElementwhere
RawVecInner: UnwindSafe,
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.