pub struct BoxedNode<'a>(pub &'a str);Expand description
A light-stroke box with the label inside, sized
(label chars + 4, 3) — a real box out of the box (D4). For a
box of any other size, declare a CustomNode (or your own
NodeContent impl) with a box-drawing painter.
Tuple Fields§
§0: &'a strTrait Implementations§
impl<'a> Copy for BoxedNode<'a>
Source§impl<'a> NodeContent<'a> for BoxedNode<'a>
impl<'a> NodeContent<'a> for BoxedNode<'a>
Source§fn size(&self) -> (usize, usize)
fn size(&self) -> (usize, usize)
Reserved
(width, height) in cells/rows. Layout routes edges
around this area; the painter fills it.Source§fn painter(&self) -> Option<NodePaintFn>
fn painter(&self) -> Option<NodePaintFn>
The template fn that fills the reserved area, if any.
Source§fn payload(&self) -> &'a str
fn payload(&self) -> &'a str
Data for the painter: travels like a second label, delivered
via
NodePaintCtx at paint time
and exported to JSON as "payload" on custom nodes.Auto Trait Implementations§
impl<'a> Freeze for BoxedNode<'a>
impl<'a> RefUnwindSafe for BoxedNode<'a>
impl<'a> Send for BoxedNode<'a>
impl<'a> Sync for BoxedNode<'a>
impl<'a> Unpin for BoxedNode<'a>
impl<'a> UnsafeUnpin for BoxedNode<'a>
impl<'a> UnwindSafe for BoxedNode<'a>
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