pub struct Component { /* private fields */ }
Available on crate feature
component-model
only.Expand description
A pseudo-random WebAssembly component.
Construct instances of this type with the Arbitrary
trait.
§Configured Generated Components
The Arbitrary
implementation uses the Config::default()
configuration. If you want to customize the shape of generated components,
create your own Config
instance and pass it to
Component::new
.
Implementations§
Trait Implementations§
Source§impl<'a> Arbitrary<'a> for Component
impl<'a> Arbitrary<'a> for Component
Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moreAuto Trait Implementations§
impl Freeze for Component
impl !RefUnwindSafe for Component
impl !Send for Component
impl !Sync for Component
impl Unpin for Component
impl !UnwindSafe for Component
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