pub struct CodeFold {
pub from: u64,
pub to: u64,
pub label: Option<String>,
pub note: Option<Text>,
pub tone: Option<Tone>,
pub open: Option<bool>,
pub hovercard: Option<Value>,
}Expand description
A run of lines a code block draws as one row until it is opened.
Fields§
§from: u64The first folded line, in the gutter’s numbering.
to: u64The last folded line, in the gutter’s numbering.
label: Option<String>The folded row’s text, in the code’s face (default … [lines {from}-{to}], … [line {from}] for one line).
note: Option<Text>What the fold hides, after a sparkline of its lines’ heat.
tone: Option<Tone>error tints the row; any tone colors the note.
open: Option<bool>Drawn open; a click on the folded row (or an open fold’s head) toggles it in place.
hovercard: Option<Value>A card shown while the pointer rests on the folded row: an id-less
node tree, as Node::to_json gives.
Trait Implementations§
impl Eq for CodeFold
impl StructuralPartialEq for CodeFold
Auto Trait Implementations§
impl Freeze for CodeFold
impl RefUnwindSafe for CodeFold
impl Send for CodeFold
impl Sync for CodeFold
impl Unpin for CodeFold
impl UnsafeUnpin for CodeFold
impl UnwindSafe for CodeFold
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.