pub struct DeterministicIdGenerator { /* private fields */ }Expand description
In-memory deterministic id generator fixture for SDK conformance tests. Use it to script deterministic behavior in memory; any transcript or endpoint mutation is documented on the method that performs it.
Implementations§
Source§impl DeterministicIdGenerator
impl DeterministicIdGenerator
Sourcepub fn new(seed: u64) -> Self
pub fn new(seed: u64) -> Self
Creates a new testing::fakes value with explicit caller-provided inputs. This constructor is data-only and performs no I/O or external side effects.
Sourcepub fn next_raw(&self, prefix: &str) -> String
pub fn next_raw(&self, prefix: &str) -> String
Builds the next raw value. This is data construction and performs no I/O, journal append, event publication, or process work.
Sourcepub fn next_content_ref(&self) -> ContentId
pub fn next_content_ref(&self) -> ContentId
Returns the next content ref currently held by this value. This reads deterministic in-memory test state and performs no external I/O.
Trait Implementations§
Source§impl Clone for DeterministicIdGenerator
impl Clone for DeterministicIdGenerator
Source§fn clone(&self) -> DeterministicIdGenerator
fn clone(&self) -> DeterministicIdGenerator
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 moreAuto Trait Implementations§
impl !Freeze for DeterministicIdGenerator
impl !RefUnwindSafe for DeterministicIdGenerator
impl Send for DeterministicIdGenerator
impl !Sync for DeterministicIdGenerator
impl Unpin for DeterministicIdGenerator
impl UnsafeUnpin for DeterministicIdGenerator
impl UnwindSafe for DeterministicIdGenerator
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