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§
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more