pub struct Choice { /* private fields */ }
Expand description
A container of elements, drawn vertically, where exactly one element has to be picked
Use Empty
as one of the elements to make the entire Choice
optional (a shorthand for
Optional(Choice(..))
.
Implementations
sourceimpl Choice
impl Choice
pub fn new(children: Vec<Box<dyn RailroadNode>>) -> Self
pub fn push(&mut self, child: impl RailroadNode + 'static) -> &mut Self
sourcepub fn attr(&mut self, key: String) -> Entry<'_, String, String>
pub fn attr(&mut self, key: String) -> Entry<'_, String, String>
Access an attribute on the main SVG-element that will be drawn.
pub fn into_inner(self) -> Vec<Box<dyn RailroadNode>>
Trait Implementations
sourceimpl RailroadNode for Choice
impl RailroadNode for Choice
sourcefn entry_height(&self) -> i64
fn entry_height(&self) -> i64
The vertical distance from this element’s top to where the entering,
connecting path is drawn. Read more
sourcefn height_below_entry(&self) -> i64
fn height_below_entry(&self) -> i64
The vertical distance from the height of the connecting path to the bottom.
Auto Trait Implementations
impl !RefUnwindSafe for Choice
impl !Send for Choice
impl !Sync for Choice
impl Unpin for Choice
impl !UnwindSafe for Choice
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more