MCPcopy Create free account
hub / github.com/base/triedb / arbitrary_with

Method arbitrary_with

src/node.rs:711–723  ·  view source on GitHub ↗
(params: Self::Parameters)

Source from the content-addressed store, hash-verified

709 >;
710
711 fn arbitrary_with(params: Self::Parameters) -> Self::Strategy {
712 let (mut nibbles_params, kind_params) = params;
713 nibbles_params = proptest::collection::SizeRange::new(
714 nibbles_params.start()..=nibbles_params.end_incl().min(64),
715 );
716 Strategy::prop_map(
717 (
718 arbitrary::any_with::<Nibbles>(nibbles_params),
719 arbitrary::any_with::<NodeKind>(kind_params),
720 ),
721 |(prefix, kind)| Self(Box::new(NodeInner { prefix, kind })),
722 )
723 }
724}
725
726/// The value stored in a [Node].

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected