pub struct Steps { /* private fields */ }Expand description
Where someone is in a process.
let s = Steps![current = 1, Step![title = "Account"], Step![title = "Plan"], Step![title = "Done"]];
let html = render_static(s);
assert!(html.contains("nr-step-done") && html.contains(r#"aria-current="step""#) && html.contains("nr-step-upcoming"));Implementations§
Source§impl Steps
impl Steps
pub fn new() -> Self
Sourcepub fn class(self, v: impl Into<String>) -> Self
pub fn class(self, v: impl Into<String>) -> Self
Extra classes for the outer element. They win over the defaults.
pub fn steps(self, v: impl IntoIterator<Item = Step>) -> Self
Sourcepub fn current(self, v: usize) -> Self
pub fn current(self, v: usize) -> Self
Index of the current step (0-based); earlier ones are done.
pub fn color(self, v: Color) -> Self
pub fn size(self, v: Size) -> Self
pub fn vertical(self, v: bool) -> Self
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Steps
impl !Sync for Steps
impl !UnwindSafe for Steps
impl Forget for Steps
impl Freeze for Steps
impl Move for Steps
impl Send for Steps
impl Unpin for Steps
impl UnsafeUnpin for Steps
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