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.
Trait Implementations§
Source§impl Clone for TargetDescription
impl Clone for TargetDescription
Source§fn clone(&self) -> TargetDescription
fn clone(&self) -> TargetDescription
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TargetDescription
impl Debug for TargetDescription
impl Eq for TargetDescription
Source§impl PartialEq for TargetDescription
impl PartialEq for TargetDescription
Source§fn eq(&self, other: &TargetDescription) -> bool
fn eq(&self, other: &TargetDescription) -> bool
self and other values to be equal, and is used by ==.