Struct PgLQueryVariantFlag
pub struct PgLQueryVariantFlag(/* private fields */);Expand description
Modifiers that can be set to non-star labels
Implementations§
§impl PgLQueryVariantFlag
impl PgLQueryVariantFlag
pub const ANY_END: PgLQueryVariantFlag
pub const ANY_END: PgLQueryVariantFlag
-
- Match any label with this prefix, for example foo* matches foobar
pub const IN_CASE: PgLQueryVariantFlag
pub const IN_CASE: PgLQueryVariantFlag
@ - Match case-insensitively, for example a@ matches A
pub const SUBLEXEME: PgLQueryVariantFlag
pub const SUBLEXEME: PgLQueryVariantFlag
% - Match initial underscore-separated words
§impl PgLQueryVariantFlag
impl PgLQueryVariantFlag
pub const fn empty() -> PgLQueryVariantFlag
pub const fn empty() -> PgLQueryVariantFlag
Get a flags value with all bits unset.
pub const fn all() -> PgLQueryVariantFlag
pub const fn all() -> PgLQueryVariantFlag
Get a flags value with all known bits set.
pub const fn bits(&self) -> u16
pub const fn bits(&self) -> u16
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
pub const fn from_bits(bits: u16) -> Option<PgLQueryVariantFlag>
pub const fn from_bits(bits: u16) -> Option<PgLQueryVariantFlag>
Convert from a bits value.
This method will return None if any unknown bits are set.
pub const fn from_bits_truncate(bits: u16) -> PgLQueryVariantFlag
pub const fn from_bits_truncate(bits: u16) -> PgLQueryVariantFlag
Convert from a bits value, unsetting any unknown bits.
pub const fn from_bits_retain(bits: u16) -> PgLQueryVariantFlag
pub const fn from_bits_retain(bits: u16) -> PgLQueryVariantFlag
Convert from a bits value exactly.
pub fn from_name(name: &str) -> Option<PgLQueryVariantFlag>
pub fn from_name(name: &str) -> Option<PgLQueryVariantFlag>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
pub const fn intersects(&self, other: PgLQueryVariantFlag) -> bool
pub const fn intersects(&self, other: PgLQueryVariantFlag) -> bool
Whether any set bits in other are also set in self.
pub const fn contains(&self, other: PgLQueryVariantFlag) -> bool
pub const fn contains(&self, other: PgLQueryVariantFlag) -> bool
Whether all set bits in other are also set in self.
pub fn insert(&mut self, other: PgLQueryVariantFlag)
pub fn insert(&mut self, other: PgLQueryVariantFlag)
The bitwise or (|) of the bits in self and other.
pub fn remove(&mut self, other: PgLQueryVariantFlag)
pub fn remove(&mut self, other: PgLQueryVariantFlag)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
pub fn toggle(&mut self, other: PgLQueryVariantFlag)
pub fn toggle(&mut self, other: PgLQueryVariantFlag)
The bitwise exclusive-or (^) of the bits in self and other.
pub fn set(&mut self, other: PgLQueryVariantFlag, value: bool)
pub fn set(&mut self, other: PgLQueryVariantFlag, value: bool)
Call insert when value is true or remove when value is false.
pub const fn intersection(
self,
other: PgLQueryVariantFlag,
) -> PgLQueryVariantFlag
pub const fn intersection( self, other: PgLQueryVariantFlag, ) -> PgLQueryVariantFlag
The bitwise and (&) of the bits in self and other.
pub const fn union(self, other: PgLQueryVariantFlag) -> PgLQueryVariantFlag
pub const fn union(self, other: PgLQueryVariantFlag) -> PgLQueryVariantFlag
The bitwise or (|) of the bits in self and other.
pub const fn difference(self, other: PgLQueryVariantFlag) -> PgLQueryVariantFlag
pub const fn difference(self, other: PgLQueryVariantFlag) -> PgLQueryVariantFlag
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
pub const fn symmetric_difference(
self,
other: PgLQueryVariantFlag,
) -> PgLQueryVariantFlag
pub const fn symmetric_difference( self, other: PgLQueryVariantFlag, ) -> PgLQueryVariantFlag
The bitwise exclusive-or (^) of the bits in self and other.
pub const fn complement(self) -> PgLQueryVariantFlag
pub const fn complement(self) -> PgLQueryVariantFlag
The bitwise negation (!) of the bits in self, truncating the result.
§impl PgLQueryVariantFlag
impl PgLQueryVariantFlag
pub const fn iter(&self) -> Iter<PgLQueryVariantFlag>
pub const fn iter(&self) -> Iter<PgLQueryVariantFlag>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
pub const fn iter_names(&self) -> IterNames<PgLQueryVariantFlag>
pub const fn iter_names(&self) -> IterNames<PgLQueryVariantFlag>
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
§impl Binary for PgLQueryVariantFlag
impl Binary for PgLQueryVariantFlag
§impl BitAnd for PgLQueryVariantFlag
impl BitAnd for PgLQueryVariantFlag
§fn bitand(self, other: PgLQueryVariantFlag) -> PgLQueryVariantFlag
fn bitand(self, other: PgLQueryVariantFlag) -> PgLQueryVariantFlag
The bitwise and (&) of the bits in self and other.
§type Output = PgLQueryVariantFlag
type Output = PgLQueryVariantFlag
& operator.§impl BitAndAssign for PgLQueryVariantFlag
impl BitAndAssign for PgLQueryVariantFlag
§fn bitand_assign(&mut self, other: PgLQueryVariantFlag)
fn bitand_assign(&mut self, other: PgLQueryVariantFlag)
The bitwise and (&) of the bits in self and other.
§impl BitOr for PgLQueryVariantFlag
impl BitOr for PgLQueryVariantFlag
§fn bitor(self, other: PgLQueryVariantFlag) -> PgLQueryVariantFlag
fn bitor(self, other: PgLQueryVariantFlag) -> PgLQueryVariantFlag
The bitwise or (|) of the bits in self and other.
§type Output = PgLQueryVariantFlag
type Output = PgLQueryVariantFlag
| operator.§impl BitOrAssign for PgLQueryVariantFlag
impl BitOrAssign for PgLQueryVariantFlag
§fn bitor_assign(&mut self, other: PgLQueryVariantFlag)
fn bitor_assign(&mut self, other: PgLQueryVariantFlag)
The bitwise or (|) of the bits in self and other.
§impl BitXor for PgLQueryVariantFlag
impl BitXor for PgLQueryVariantFlag
§fn bitxor(self, other: PgLQueryVariantFlag) -> PgLQueryVariantFlag
fn bitxor(self, other: PgLQueryVariantFlag) -> PgLQueryVariantFlag
The bitwise exclusive-or (^) of the bits in self and other.
§type Output = PgLQueryVariantFlag
type Output = PgLQueryVariantFlag
^ operator.§impl BitXorAssign for PgLQueryVariantFlag
impl BitXorAssign for PgLQueryVariantFlag
§fn bitxor_assign(&mut self, other: PgLQueryVariantFlag)
fn bitxor_assign(&mut self, other: PgLQueryVariantFlag)
The bitwise exclusive-or (^) of the bits in self and other.
§impl Clone for PgLQueryVariantFlag
impl Clone for PgLQueryVariantFlag
§fn clone(&self) -> PgLQueryVariantFlag
fn clone(&self) -> PgLQueryVariantFlag
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for PgLQueryVariantFlag
impl Debug for PgLQueryVariantFlag
§impl Display for PgLQueryVariantFlag
impl Display for PgLQueryVariantFlag
§impl Extend<PgLQueryVariantFlag> for PgLQueryVariantFlag
impl Extend<PgLQueryVariantFlag> for PgLQueryVariantFlag
§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = PgLQueryVariantFlag>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = PgLQueryVariantFlag>,
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)§impl Flags for PgLQueryVariantFlag
impl Flags for PgLQueryVariantFlag
§const FLAGS: &'static [Flag<PgLQueryVariantFlag>]
const FLAGS: &'static [Flag<PgLQueryVariantFlag>]
§fn from_bits_retain(bits: u16) -> PgLQueryVariantFlag
fn from_bits_retain(bits: u16) -> PgLQueryVariantFlag
§fn all_named() -> PgLQueryVariantFlag
fn all_named() -> PgLQueryVariantFlag
§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
§fn iter_defined_names() -> IterDefinedNames<Self>
fn iter_defined_names() -> IterDefinedNames<Self>
Self::FLAGS].§fn iter_equal_names(&self) -> IterEqualNames<Self>
fn iter_equal_names(&self) -> IterEqualNames<Self>
§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in self and other.§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in self and other.§fn set(&mut self, other: Self, value: bool)where
Self: Sized,
fn set(&mut self, other: Self, value: bool)where
Self: Sized,
Flags::insert] when value is true or [Flags::remove] when value is false.§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.§impl FromIterator<PgLQueryVariantFlag> for PgLQueryVariantFlag
impl FromIterator<PgLQueryVariantFlag> for PgLQueryVariantFlag
§fn from_iter<T>(iterator: T) -> PgLQueryVariantFlagwhere
T: IntoIterator<Item = PgLQueryVariantFlag>,
fn from_iter<T>(iterator: T) -> PgLQueryVariantFlagwhere
T: IntoIterator<Item = PgLQueryVariantFlag>,
The bitwise or (|) of the bits in each flags value.
§impl Hash for PgLQueryVariantFlag
impl Hash for PgLQueryVariantFlag
§impl IntoIterator for PgLQueryVariantFlag
impl IntoIterator for PgLQueryVariantFlag
§type Item = PgLQueryVariantFlag
type Item = PgLQueryVariantFlag
§type IntoIter = Iter<PgLQueryVariantFlag>
type IntoIter = Iter<PgLQueryVariantFlag>
§fn into_iter(self) -> <PgLQueryVariantFlag as IntoIterator>::IntoIter
fn into_iter(self) -> <PgLQueryVariantFlag as IntoIterator>::IntoIter
§impl LowerHex for PgLQueryVariantFlag
impl LowerHex for PgLQueryVariantFlag
§impl Not for PgLQueryVariantFlag
impl Not for PgLQueryVariantFlag
§fn not(self) -> PgLQueryVariantFlag
fn not(self) -> PgLQueryVariantFlag
The bitwise negation (!) of the bits in self, truncating the result.
§type Output = PgLQueryVariantFlag
type Output = PgLQueryVariantFlag
! operator.§impl Octal for PgLQueryVariantFlag
impl Octal for PgLQueryVariantFlag
§impl PartialEq for PgLQueryVariantFlag
impl PartialEq for PgLQueryVariantFlag
§impl Sub for PgLQueryVariantFlag
impl Sub for PgLQueryVariantFlag
§fn sub(self, other: PgLQueryVariantFlag) -> PgLQueryVariantFlag
fn sub(self, other: PgLQueryVariantFlag) -> PgLQueryVariantFlag
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
§type Output = PgLQueryVariantFlag
type Output = PgLQueryVariantFlag
- operator.§impl SubAssign for PgLQueryVariantFlag
impl SubAssign for PgLQueryVariantFlag
§fn sub_assign(&mut self, other: PgLQueryVariantFlag)
fn sub_assign(&mut self, other: PgLQueryVariantFlag)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
§impl UpperHex for PgLQueryVariantFlag
impl UpperHex for PgLQueryVariantFlag
impl Copy for PgLQueryVariantFlag
impl Eq for PgLQueryVariantFlag
impl StructuralPartialEq for PgLQueryVariantFlag
Auto Trait Implementations§
impl Freeze for PgLQueryVariantFlag
impl RefUnwindSafe for PgLQueryVariantFlag
impl Send for PgLQueryVariantFlag
impl Sync for PgLQueryVariantFlag
impl Unpin for PgLQueryVariantFlag
impl UnsafeUnpin for PgLQueryVariantFlag
impl UnwindSafe for PgLQueryVariantFlag
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> ⓘ
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> ⓘ
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§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
MaybeRef].