pub struct Decoys { /* private fields */ }
Implementations§
source§impl Decoys
impl Decoys
pub fn new( deps: DepsMut<'_>, decoys: &[String], entropy: Option<impl AsRef<[u8]>> ) -> StdResult<Option<Self>>
sourcepub fn acc_index(&self) -> usize
pub fn acc_index(&self) -> usize
Returns the index at which the real account will be shuffled in.
sourcepub fn shuffle_in<'a, 'b: 'a>(
&'b self,
account: &'a Account
) -> impl Iterator<Item = &'a Account>
pub fn shuffle_in<'a, 'b: 'a>( &'b self, account: &'a Account ) -> impl Iterator<Item = &'a Account>
Mixes the given account
with the decoy accounts
and returns an iterator over all of them.
Auto Trait Implementations§
impl RefUnwindSafe for Decoys
impl Send for Decoys
impl Sync for Decoys
impl Unpin for Decoys
impl UnwindSafe for Decoys
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