pub struct StepDoc(/* private fields */);Expand description
Inline documentation for a step. Chain after a step method: story.given("text").with_docs(vec![StepDoc::note("a note")]).
Implementations§
Source§impl StepDoc
impl StepDoc
pub fn note(text: &str) -> Self
pub fn tag(names: &[&str]) -> Self
pub fn kv(label: &str, value: Value) -> Self
pub fn json_doc(label: &str, value: &impl Serialize) -> Self
pub fn code(label: &str, content: &str, lang: Option<&str>) -> Self
pub fn table(label: &str, columns: &[&str], rows: &[&[&str]]) -> Self
pub fn link(label: &str, url: &str) -> Self
pub fn section(title: &str, markdown: &str) -> Self
pub fn mermaid(code: &str, title: Option<&str>) -> Self
pub fn screenshot(path: &str, alt: Option<&str>) -> Self
pub fn video(path: &str, caption: Option<&str>, poster: Option<&str>) -> Self
pub fn html(opts: HtmlOptions<'_>) -> Self
pub fn state(label: Option<&str>, value: Value) -> Self
pub fn custom(type_name: &str, data: Value) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StepDoc
impl RefUnwindSafe for StepDoc
impl Send for StepDoc
impl Sync for StepDoc
impl Unpin for StepDoc
impl UnsafeUnpin for StepDoc
impl UnwindSafe for StepDoc
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