pub enum ArgAtom {
FixtureLocal {
name: String,
},
ConstLit {
text: String,
},
ConstPath {
def_path: String,
},
Unsupported,
}Expand description
A lowered argument value that participates in helper-call grouping.
Variants§
FixtureLocal
An argument supplied by an rstest fixture-local parameter.
ConstLit
A stable literal argument, stored as canonical source text.
ConstPath
A stable constant path, stored as a canonical definition path.
Unsupported
A present argument shape that later lowering does not support.
Implementations§
Source§impl ArgAtom
impl ArgAtom
Sourcepub fn fixture_local(name: impl Into<String>) -> Self
pub fn fixture_local(name: impl Into<String>) -> Self
Builds a fixture-local argument atom.
§Examples
use whitaker_common::rstest::ArgAtom;
let atom = ArgAtom::fixture_local("db");
assert_eq!(atom, ArgAtom::FixtureLocal { name: "db".to_string() });Sourcepub fn const_lit(text: impl Into<String>) -> Self
pub fn const_lit(text: impl Into<String>) -> Self
Builds a stable literal argument atom.
§Examples
use whitaker_common::rstest::ArgAtom;
let atom = ArgAtom::const_lit("42");
assert_eq!(atom, ArgAtom::ConstLit { text: "42".to_string() });Sourcepub fn const_path(def_path: impl Into<String>) -> Self
pub fn const_path(def_path: impl Into<String>) -> Self
Builds a stable constant-path argument atom.
§Examples
use whitaker_common::rstest::ArgAtom;
let atom = ArgAtom::const_path("crate::defaults::TIMEOUT");
assert_eq!(
atom,
ArgAtom::ConstPath {
def_path: "crate::defaults::TIMEOUT".to_string(),
},
);Sourcepub const fn unsupported() -> Self
pub const fn unsupported() -> Self
Builds an explicit unsupported argument atom.
§Examples
use whitaker_common::rstest::ArgAtom;
assert_eq!(ArgAtom::unsupported(), ArgAtom::Unsupported);Trait Implementations§
impl Eq for ArgAtom
impl StructuralPartialEq for ArgAtom
Auto Trait Implementations§
impl Freeze for ArgAtom
impl RefUnwindSafe for ArgAtom
impl Send for ArgAtom
impl Sync for ArgAtom
impl Unpin for ArgAtom
impl UnsafeUnpin for ArgAtom
impl UnwindSafe for ArgAtom
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