pub struct BindingFixture { /* private fields */ }Expand description
One observable program binding used by the standard execution cases.
Implementations§
Source§impl BindingFixture
impl BindingFixture
Sourcepub fn new(
slot: u32,
access: AccessMode,
domain: MemoryDomain,
alignment: u64,
initial: impl Into<Vec<u8>>,
expected: impl Into<Vec<u8>>,
) -> Result<Self, TargetDescriptionError>
pub fn new( slot: u32, access: AccessMode, domain: MemoryDomain, alignment: u64, initial: impl Into<Vec<u8>>, expected: impl Into<Vec<u8>>, ) -> Result<Self, TargetDescriptionError>
Describe one nonempty binding and its expected bytes after successful completion.
Sourcepub fn read_only(
slot: u32,
domain: MemoryDomain,
alignment: u64,
initial: impl Into<Vec<u8>>,
) -> Result<Self, TargetDescriptionError>
pub fn read_only( slot: u32, domain: MemoryDomain, alignment: u64, initial: impl Into<Vec<u8>>, ) -> Result<Self, TargetDescriptionError>
Describe one nonempty read-only binding whose bytes must be unchanged after completion.
Read-only fixtures model program inputs of lowered artifacts whose input and output slots are disjoint. The executing cases verify the bytes byte-for-byte after completion, so a program that clobbers its inputs fails the suite.
Sourcepub const fn is_writable(&self) -> bool
pub const fn is_writable(&self) -> bool
Whether the program may write through this binding, making its output observable.
pub const fn slot(&self) -> u32
pub const fn access(&self) -> AccessMode
pub const fn domain(&self) -> MemoryDomain
pub const fn alignment(&self) -> u64
pub fn initial(&self) -> &[u8] ⓘ
pub fn expected(&self) -> &[u8] ⓘ
pub fn bytes(&self) -> u64
Trait Implementations§
Source§impl Clone for BindingFixture
impl Clone for BindingFixture
Source§fn clone(&self) -> BindingFixture
fn clone(&self) -> BindingFixture
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BindingFixture
impl Debug for BindingFixture
impl Eq for BindingFixture
Source§impl PartialEq for BindingFixture
impl PartialEq for BindingFixture
Source§fn eq(&self, other: &BindingFixture) -> bool
fn eq(&self, other: &BindingFixture) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BindingFixture
Auto Trait Implementations§
impl Freeze for BindingFixture
impl RefUnwindSafe for BindingFixture
impl Send for BindingFixture
impl Sync for BindingFixture
impl Unpin for BindingFixture
impl UnsafeUnpin for BindingFixture
impl UnwindSafe for BindingFixture
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