pub struct TargetDescription { /* private fields */ }Expand description
Owned provider-specific data required by the transport-free standard suite.
Implementations§
Source§impl TargetDescription
impl TargetDescription
Sourcepub fn new(program: ProgramFixture, binding: BindingFixture) -> Self
pub fn new(program: ProgramFixture, binding: BindingFixture) -> Self
Describe a program driven by exactly one writable, observable binding.
§Panics
Panics when binding is read-only. Read-only fixtures only make sense alongside a
writable one; use Self::with_bindings for programs with disjoint input and output
slots.
Sourcepub fn with_bindings(
program: ProgramFixture,
bindings: Vec<BindingFixture>,
) -> Result<Self, TargetDescriptionError>
pub fn with_bindings( program: ProgramFixture, bindings: Vec<BindingFixture>, ) -> Result<Self, TargetDescriptionError>
Describe a program driven by one buffer per binding fixture.
Slots must be unique and at least one fixture must be writable; the first writable fixture becomes the primary binding that negative submission subcases perturb and that buffer-transfer cases exercise. Executing cases bind every fixture in declared order and verify every fixture’s expected bytes after completion.
pub const fn program(&self) -> &ProgramFixture
Sourcepub fn binding(&self) -> &BindingFixture
pub fn binding(&self) -> &BindingFixture
The primary binding: the first writable, observable fixture.
Sourcepub fn bindings(&self) -> &[BindingFixture]
pub fn bindings(&self) -> &[BindingFixture]
Every binding fixture in submission order.
Sourcepub const fn primary_index(&self) -> usize
pub const fn primary_index(&self) -> usize
Index of the primary binding within Self::bindings.