pub struct DirectiveKey {
pub name: String,
pub label: String,
pub attrs: Vec<(String, String)>,
}Expand description
What a directive’s reported height is keyed by: everything a host draws it
from — its name, its label and its attributes — and nothing about where it
stands. The peer of a picture’s destination, which keys
crate::Doc::set_media_rows: two directives spelled alike draw alike and
so stand as tall, and the height survives an edit above them, which a key
by position would not.
An attribute’s value is flattened, a bare attribute to "", because that is
the shape both bindings hand a host (DirectiveAttr, a string value) and so
the shape a host’s report comes back in; the difference between {wide} and
{wide=""} is not one a drawing is expected to make.
Fields§
§name: String§label: String§attrs: Vec<(String, String)>Implementations§
Trait Implementations§
Source§impl Clone for DirectiveKey
impl Clone for DirectiveKey
Source§impl Debug for DirectiveKey
impl Debug for DirectiveKey
Source§impl Default for DirectiveKey
impl Default for DirectiveKey
impl Eq for DirectiveKey
Source§impl Hash for DirectiveKey
impl Hash for DirectiveKey
Source§impl PartialEq for DirectiveKey
impl PartialEq for DirectiveKey
impl StructuralPartialEq for DirectiveKey
Auto Trait Implementations§
impl Freeze for DirectiveKey
impl RefUnwindSafe for DirectiveKey
impl Send for DirectiveKey
impl Sync for DirectiveKey
impl Unpin for DirectiveKey
impl UnsafeUnpin for DirectiveKey
impl UnwindSafe for DirectiveKey
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