Skip to main content

Column

Enum Column 

Source
pub enum Column<C: Columnar> {
    Typed(C::Container),
    Bytes(Bytes),
    Align(Vec<u64>),
}
Expand description

A container based on a columnar store, encoded in aligned bytes: the container on dataflow edges.

The type can represent typed data, bytes from Timely, or an aligned allocation. The name is singular to express that the preferred format is Column::Align. The Column::Typed variant is used to construct the container, and it owns potentially multiple columns of data.

Data at rest behind an edge, in a merge batcher’s chains, a spill-backed chunk, or a batch builder, is a body::ColumnBody instead, which has no channel-bytes form.

Variants§

§

Typed(C::Container)

The typed variant of the container.

§

Bytes(Bytes)

The binary variant of the container.

§

Align(Vec<u64>)

Relocated, aligned binary data, if Bytes doesn’t work for some reason.

Reasons could include misalignment, cloning of data, or wanting to release the Bytes as a scarce resource.

Vec<u64> guarantees u64 alignment for the contained bytes.

Implementations§

Source§

impl<D, T, R> Column<(D, T, R)>
where D: Columnar, for<'a> Ref<'a, D>: Copy + Ord, T: Columnar + Default + Clone + PartialOrder, for<'a> Ref<'a, T>: Copy + Ord, R: Columnar + Default + Semigroup + for<'a> Semigroup<Ref<'a, R>>,

The same merge and extract for the column pager’s Column chunks.

Source

pub fn merge_from( &mut self, others: &mut [Self], positions: &mut [usize], ) -> bool

Merge items from sorted inputs into self, advancing positions. See merge_from.

Source

pub fn extract( &mut self, position: &mut usize, upper: AntichainRef<'_, T>, frontier: &mut Antichain<T>, keep: &mut Self, ship: &mut Self, )

Partition records starting at *position into keep and ship. See extract.

Source§

impl<C: Columnar> Column<C>

Source

pub fn clear(&mut self)

Empties the column, retaining the Typed variant’s allocation so the caller can refill it.

columnar::Clear clears the typed container in place without releasing its capacity. The serialized variants (Bytes/Align) own no reusable typed buffer, so they are reset to an empty Typed.

Source

pub fn is_empty(&self) -> bool

True when the column holds no records.

The Typed variant answers from the container itself. The serialized variants have to reconstruct their borrowed view to reach a length, so there this costs as much as Column::borrow.

Source

pub fn borrow(&self) -> <C::Container as Borrow>::Borrowed<'_>

Borrows the container as a reference.

Trait Implementations§

Source§

impl<C: Columnar> Accountable for Column<C>

Source§

fn record_count(&self) -> i64

The number of records Read more
Source§

fn is_empty(&self) -> bool

Determine if this contains any updates, corresponding to update_count() == 0. It is a correctness error for this to be anything other than self.record_count() == 0.
Source§

impl<KBC, VBC, K, V, T, R> BuilderInput<KBC, VBC> for Column<((K, V), T, R)>
where K: Columnar, V: Columnar, T: Columnar + Timestamp + Lattice + Clone, R: Columnar + Ord + Semigroup + Clone, for<'a> Ref<'a, K>: Copy + Ord, for<'a> Ref<'a, V>: Copy + Ord, KBC: BatchContainer, VBC: BatchContainer, for<'a, 'b> KBC::ReadItem<'a>: PartialEq<Ref<'b, K>>, for<'a, 'b> VBC::ReadItem<'a>: PartialEq<Ref<'b, V>>,

Source§

type Key<'a> = <<K as Columnar>::Container as Borrow>::Ref<'a>

Key portion
Source§

type Val<'a> = <<V as Columnar>::Container as Borrow>::Ref<'a>

Value portion
Source§

type Time = T

Time
Source§

type Diff = R

Diff
Source§

fn into_parts<'a>( item: Self::Item<'a>, ) -> (Self::Key<'a>, Self::Val<'a>, Self::Time, Self::Diff)

Split an item into separate parts.
Source§

fn key_eq(this: &Ref<'_, K>, other: KBC::ReadItem<'_>) -> bool

Test that the key equals a key in the layout’s key container.
Source§

fn val_eq(this: &Ref<'_, V>, other: VBC::ReadItem<'_>) -> bool

Test that the value equals a key in the layout’s value container.
Source§

fn key_val_upd_counts(chain: &[Self]) -> (usize, usize, usize)

Count the number of distinct keys, (key, val) pairs, and total updates.
Source§

impl<C: Columnar> Clone for Column<C>
where C::Container: Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<C: Columnar> ContainerBytes for Column<C>

Source§

fn from_bytes(bytes: Bytes) -> Self

Wrap bytes as Self.
Source§

fn length_in_bytes(&self) -> usize

The number of bytes required to serialize the data.
Source§

fn into_bytes<W: Write>(&self, writer: &mut W)

Writes the binary representation into writer.
Source§

impl<C: Columnar> Default for Column<C>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<C: Columnar> DrainContainer for Column<C>

Source§

type Item<'a> = <<C as Columnar>::Container as Borrow>::Ref<'a>

The type of elements when draining the container.
Source§

type DrainIter<'a> = IterOwn<<<C as Columnar>::Container as Borrow>::Borrowed<'a>>

Iterator type when draining the container.
Source§

fn drain(&mut self) -> Self::DrainIter<'_>

Returns an iterator that drains the contents of this container. Drain leaves the container in an undefined state.
Source§

impl<D, T1, T2, R> Enter<T1, T2> for Column<(D, T1, R)>
where D: Columnar, T1: Columnar + Timestamp, T2: Columnar + Refines<T1>, R: Columnar, (D, T1, R): Columnar<Container = (D::Container, T1::Container, R::Container)>, (D, T2, R): Columnar<Container = (D::Container, T2::Container, R::Container)>, for<'a> D::Container: Push<Ref<'a, D>>, for<'a> T2::Container: Push<&'a T2>, for<'a> R::Container: Push<Ref<'a, R>>,

Re-encodes a column’s times into a refining timestamp, so a columnar collection can enter an iterative scope.

Source§

type InnerContainer = Column<(D, T2, R)>

The resulting container type.
Source§

fn enter(self) -> Self::InnerContainer

Update timestamps from T1 to T2.
Source§

impl<C: Columnar> From<Column<C>> for ColumnBody<C>

A body leaves the edge container behind: typed data moves, and channel bytes are relocated into owned words, since a body never holds a channel’s allocation.

Source§

fn from(column: Column<C>) -> Self

Converts to this type from the input type.
Source§

impl<C: Columnar> From<ColumnBody<C>> for Column<C>

A body goes back onto an edge as it is: both of its forms are forms of the edge container.

Source§

fn from(body: ColumnBody<C>) -> Self

Converts to this type from the input type.
Source§

impl<C: Columnar> MergeChunk<C> for Column<C>

Source§

fn typed(&mut self) -> &mut C::Container

The typed containers, for writing to.
Source§

fn view(&self) -> BorrowedOf<'_, C>

The chunk as a columnar view.
Source§

fn is_empty(&self) -> bool

True when the chunk holds no records.
Source§

impl<'a, D, T, R> PushInto<&'a mut Column<(D, T, R)>> for Chunker<ColumnationStack<(D, T, R)>>
where D: Columnar + Columnation, for<'b> Ref<'b, D>: Ord + Copy, T: Columnar + Columnation, for<'b> Ref<'b, T>: Ord + Copy, R: Columnar + Columnation + Semigroup + for<'b> Semigroup<Ref<'b, R>>, for<'b> Ref<'b, R>: Ord,

Source§

fn push_into(&mut self, container: &'a mut Column<(D, T, R)>)

Push item into self.
Source§

impl<'a, D, T, R> PushInto<&'a mut Column<(D, T, R)>> for ColumnChunker<(D, T, R)>
where D: Columnar, for<'b> Ref<'b, D>: Copy + Ord, T: Columnar, for<'b> Ref<'b, T>: Copy + Ord, R: Columnar + Default + Semigroup + for<'b> Semigroup<Ref<'b, R>>, for<'b> Ref<'b, R>: Ord, for<'b> <D as Columnar>::Container: Push<Ref<'b, D>>, for<'b> <T as Columnar>::Container: Push<Ref<'b, T>>, for<'b> <R as Columnar>::Container: Push<&'b R>,

Source§

fn push_into(&mut self, container: &'a mut Column<(D, T, R)>)

Push item into self.
Source§

impl<'a, D, T, R> PushInto<&'a mut Column<(D, T, R)>> for ChunkChunker<D, T, R>

Source§

fn push_into(&mut self, item: &'a mut Column<(D, T, R)>)

Push item into self.
Source§

impl<'a, D, T, R> PushInto<&'a mut Column<(D, T, R)>> for PagedChunker<(D, T, R)>

Source§

fn push_into(&mut self, item: &'a mut Column<(D, T, R)>)

Push item into self.
Source§

impl<D, T, R> PushInto<Column<(D, T, R)>> for ColumnMergeBatcher<D, T, R>
where D: Columnar, for<'a> Ref<'a, D>: Copy + Ord, T: Columnar + Default + Clone + PartialOrder, for<'a> Ref<'a, T>: Copy + Ord, R: Columnar + Default + Semigroup + for<'a> Semigroup<Ref<'a, R>>,

Source§

fn push_into(&mut self, chunk: Column<(D, T, R)>)

Accept an already-consolidated chunk from the upstream chunker, route it through the pager, and insert it as a singleton chain.

Source§

impl<C: Columnar, T> PushInto<T> for Column<C>
where C::Container: Push<T>,

Source§

fn push_into(&mut self, item: T)

Push item into self.
Source§

impl<D, T, R> ResultsIn<<T as Timestamp>::Summary> for Column<(D, T, R)>
where D: Columnar, T: Columnar + Timestamp, R: Columnar, (D, T, R): Columnar<Container = (D::Container, T::Container, R::Container)>, for<'a> D::Container: Push<Ref<'a, D>>, for<'a> T::Container: Push<&'a T>, for<'a> R::Container: Push<Ref<'a, R>>,

Advances a column’s times by step, so a columnar collection can be a loop variable.

A time that the summary does not advance drops its record, so the data and diff columns cannot move across whole the way Enter moves them: a record’s position in one column has to keep matching its position in the others. The times are read and advanced first, and the rest is rebuilt only when the step actually dropped something.

Source§

fn results_in(self, step: &T::Summary) -> Self

Advance times in the container by step.
Source§

impl<C: Columnar> SizableContainer for Column<C>

Source§

fn at_capacity(&self) -> bool

Indicates that the container is “full” and should be shipped.
Source§

fn ensure_capacity(&mut self, _stash: &mut Option<Self>)

Restores self to its desired capacity, if it has one. Read more

Auto Trait Implementations§

§

impl<C> !RefUnwindSafe for Column<C>

§

impl<C> !UnwindSafe for Column<C>

§

impl<C> Freeze for Column<C>
where <C as Columnar>::Container: Freeze,

§

impl<C> Send for Column<C>
where <C as Columnar>::Container: Send,

§

impl<C> Sync for Column<C>
where <C as Columnar>::Container: Sync,

§

impl<C> Unpin for Column<C>
where <C as Columnar>::Container: Unpin,

§

impl<C> UnsafeUnpin for Column<C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

Source§

fn cast_into(self) -> U

Performs the cast.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<C> Container for C
where C: Accountable + Default + 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self> ⓘ

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Paint for T
where T: ?Sized,

Source§

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();
Source§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
Source§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
Source§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
Source§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
Source§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
Source§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
Source§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
Source§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
Source§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
Source§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
Source§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
Source§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
Source§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
Source§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
Source§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
Source§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
Source§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
Source§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
Source§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
Source§

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();
Source§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
Source§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
Source§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
Source§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
Source§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
Source§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
Source§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
Source§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
Source§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
Source§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
Source§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
Source§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
Source§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
Source§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
Source§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
Source§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
Source§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
Source§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
Source§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
Source§

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();
Source§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
Source§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
Source§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
Source§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
Source§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
Source§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
Source§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
Source§

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();
Source§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
Source§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
Source§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
Source§

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.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
Source§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
Source§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
Source§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
Source§

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);
Source§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new Painted with a default Style. Read more
Source§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<'a, S, T> Semigroup<&'a S> for T
where T: Semigroup<S>,

Source§

fn plus_equals(&mut self, rhs: &&'a S)

The method of std::ops::AddAssign, for types that do not implement AddAssign.
Source§

impl<T> ServiceExt for T

Source§

fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>
where Self: Sized,

Apply a transformation to the response body. Read more
Source§

fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using HTTP status codes. Read more
Source§

fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using gRPC headers. Read more
Source§

fn follow_redirects(self) -> FollowRedirect<Self>
where Self: Sized,

Follow redirect resposes using the Standard policy. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more