pub struct Hashed<Hasher>where
Hasher: RollingHasher + ?Sized,{ /* private fields */ }
Implementations§
Source§impl<Hasher> Hashed<Hasher>where
Hasher: RollingHasher + ?Sized,
impl<Hasher> Hashed<Hasher>where
Hasher: RollingHasher + ?Sized,
Sourcepub fn concat(&self, other: &Self) -> Self
pub fn concat(&self, other: &Self) -> Self
Examples found in repository?
crates/competitive/src/string/rolling_hash.rs (line 447)
441 pub fn pow(&self, n: usize) -> Self {
442 let mut res = Hasher::empty_hash();
443 let mut x = *self;
444 let mut n = n;
445 while n > 0 {
446 if n & 1 == 1 {
447 res = res.concat(&x);
448 }
449 x = x.concat(&x);
450 n >>= 1;
451 }
452 res
453 }
pub fn pow(&self, n: usize) -> Self
Trait Implementations§
impl<Hasher> Copy for Hashed<Hasher>where
Hasher: RollingHasher + ?Sized,
impl<Hasher> Eq for Hashed<Hasher>where
Hasher: RollingHasher + ?Sized,
Auto Trait Implementations§
impl<Hasher> Freeze for Hashed<Hasher>
impl<Hasher> RefUnwindSafe for Hashed<Hasher>
impl<Hasher> Send for Hashed<Hasher>
impl<Hasher> Sync for Hashed<Hasher>
impl<Hasher> Unpin for Hashed<Hasher>
impl<Hasher> UnwindSafe for Hashed<Hasher>
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