pub struct AliasGenerator { /* private fields */ }Expand description
A utility struct that can be used to generate unique aliases when optimizing queries
Implementations§
Source§impl AliasGenerator
impl AliasGenerator
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new AliasGenerator
Sourcepub fn update_min_id(&self, min_id: usize)
pub fn update_min_id(&self, min_id: usize)
Advance the counter to at least min_id, ensuring future aliases
won’t collide with already-existing ones.
For example, if the query already contains an alias alias_42, then calling
update_min_id(42) will ensure that future aliases generated by this
AliasGenerator will start from alias_43.
Trait Implementations§
Source§impl Debug for AliasGenerator
impl Debug for AliasGenerator
Auto Trait Implementations§
impl !Freeze for AliasGenerator
impl RefUnwindSafe for AliasGenerator
impl Send for AliasGenerator
impl Sync for AliasGenerator
impl Unpin for AliasGenerator
impl UnsafeUnpin for AliasGenerator
impl UnwindSafe for AliasGenerator
Blanket Implementations§
impl<T> Allocation for T
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