pub struct GenericProvider;Expand description
The generic battle provider: dynamic ids + the runner’s standard formula.
The stack never drives a turn loop here (the runner’s own loop fires the
events), so select_move/apply_move_effect/create_monster are inert
stubs; calculate_damage mirrors the runner formula for completeness.
Trait Implementations§
Source§impl BattleProvider for GenericProvider
impl BattleProvider for GenericProvider
Source§fn calculate_damage(
&self,
move_: &Skill,
attacker: &BattlerState<Self>,
defender: &BattlerState<Self>,
random: u8,
is_critical: bool,
) -> DamageResult
fn calculate_damage( &self, move_: &Skill, attacker: &BattlerState<Self>, defender: &BattlerState<Self>, random: u8, is_critical: bool, ) -> DamageResult
The runner’s standard formula with the variance byte and crit flag
given (the stack driver’s shape). The runner’s own loop precomputes
damage itself (damage_roll → ctx.mv.damage); this mirrors it.
Source§type Species = SpeciesData
type Species = SpeciesData
Source§fn select_move(
&self,
battler: &BattlerState<Self>,
_state: &BattleState<Self>,
) -> Self::Move
fn select_move( &self, battler: &BattlerState<Self>, _state: &BattleState<Self>, ) -> Self::Move
BattleAI implementation.Source§fn apply_move_effect(
&self,
_effect: MoveEffect,
_user: &mut BattlerState<Self>,
_target: &mut BattlerState<Self>,
) -> EffectResult
fn apply_move_effect( &self, _effect: MoveEffect, _user: &mut BattlerState<Self>, _target: &mut BattlerState<Self>, ) -> EffectResult
EffectHandler implementation.Source§fn create_monster(
&self,
species: Self::Species,
level: u8,
) -> BattlerState<Self>
fn create_monster( &self, species: Self::Species, level: u8, ) -> BattlerState<Self>
Source§fn check_faint(&self, battler: &BattlerState<Self>) -> bool
fn check_faint(&self, battler: &BattlerState<Self>) -> bool
Source§fn turn_order_key(
&self,
_state: &BattleState<Self>,
_who: BattlerRef,
_action: &BattleAction<Self>,
_rng: &mut dyn BattleRng,
) -> OrderKeywhere
Self: Sized,
fn turn_order_key(
&self,
_state: &BattleState<Self>,
_who: BattlerRef,
_action: &BattleAction<Self>,
_rng: &mut dyn BattleRng,
) -> OrderKeywhere
Self: Sized,
Source§fn before_move(
&self,
_state: &mut BattleState<Self>,
_who: BattlerRef,
_action: &BattleAction<Self>,
_rng: &mut dyn BattleRng,
) -> MoveGate<Self>where
Self: Sized,
fn before_move(
&self,
_state: &mut BattleState<Self>,
_who: BattlerRef,
_action: &BattleAction<Self>,
_rng: &mut dyn BattleRng,
) -> MoveGate<Self>where
Self: Sized,
Source§fn accuracy_check(
&self,
_state: &BattleState<Self>,
_who: BattlerRef,
_target: BattlerRef,
_move_: &Self::Move,
_rng: &mut dyn BattleRng,
) -> boolwhere
Self: Sized,
fn accuracy_check(
&self,
_state: &BattleState<Self>,
_who: BattlerRef,
_target: BattlerRef,
_move_: &Self::Move,
_rng: &mut dyn BattleRng,
) -> boolwhere
Self: Sized,
who’s move_ against target (incl. the Gen-1
1/256 miss). Returns true if the move connects. Default: always hits.Source§fn end_of_turn(
&self,
_state: &mut BattleState<Self>,
_rng: &mut dyn BattleRng,
) -> Vec<EffectResult>where
Self: Sized,
fn end_of_turn(
&self,
_state: &mut BattleState<Self>,
_rng: &mut dyn BattleRng,
) -> Vec<EffectResult>where
Self: Sized,
EffectResults for the UI. Default: no residuals.Source§fn roll_critical(
&self,
_state: &BattleState<Self>,
_who: BattlerRef,
_target: BattlerRef,
_move_: &Self::Move,
_rng: &mut dyn BattleRng,
) -> boolwhere
Self: Sized,
fn roll_critical(
&self,
_state: &BattleState<Self>,
_who: BattlerRef,
_target: BattlerRef,
_move_: &Self::Move,
_rng: &mut dyn BattleRng,
) -> boolwhere
Self: Sized,
Source§impl Clone for GenericProvider
impl Clone for GenericProvider
Source§fn clone(&self) -> GenericProvider
fn clone(&self) -> GenericProvider
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for GenericProvider
Source§impl Debug for GenericProvider
impl Debug for GenericProvider
Source§impl Default for GenericProvider
impl Default for GenericProvider
Source§fn default() -> GenericProvider
fn default() -> GenericProvider
Source§impl EffectProvider for GenericProvider
impl EffectProvider for GenericProvider
Source§fn effect_for_move(&self, _m: &Self::Move) -> Option<&'static Effect<Self>>
fn effect_for_move(&self, _m: &Self::Move) -> Option<&'static Effect<Self>>
The runner collects from the compiled registry directly (per-record), never through the resolvers.
Source§fn effect_for_status(&self, _s: &Self::Status) -> Option<&'static Effect<Self>>
fn effect_for_status(&self, _s: &Self::Status) -> Option<&'static Effect<Self>>
See effect_for_move.
Source§fn turn_order_rank(
&self,
state: &BattleState<Self>,
who: BattlerRef,
_action: &Self::Move,
) -> (i32, i32)
fn turn_order_rank( &self, state: &BattleState<Self>, who: BattlerRef, _action: &Self::Move, ) -> (i32, i32)
(-priority, -effective speed); skills carry no priority (v1), so the
priority tier is 0.
Source§type EffectStateKind = VolatileKind
type EffectStateKind = VolatileKind
effect_order and routes it to
the host). pokered supplies the Gen-1 enum (Toxic counter, Substitute hp,
…).Source§fn effect_for_volatile(
&self,
kind: &Self::EffectStateKind,
) -> Option<&'static Effect<Self>>where
Self: Sized,
fn effect_for_volatile(
&self,
kind: &Self::EffectStateKind,
) -> Option<&'static Effect<Self>>where
Self: Sized,
Effect registered for a live volatile in the effect
arena (design §3.4: every live effect on a battler contributes its
handlers, not only the non-volatile status). Returns None (the default)
when the volatile registers no hooks — so a provider that has no
volatile-borne residuals (every game built on the engine so far) is
completely unaffected and the driver’s arena-residual pass is inert. Read moreSource§fn forced_action(
&self,
effects: &[EffectState<Self>],
actor: BattlerRef,
chosen: &BattleAction<Self>,
) -> Option<BattleAction<Self>>where
Self: Sized,
fn forced_action(
&self,
effects: &[EffectState<Self>],
actor: BattlerRef,
chosen: &BattleAction<Self>,
) -> Option<BattleAction<Self>>where
Self: Sized,
actor’s chosen action, it asks the
game whether a live volatile forces a different action this turn — Gen-1
Thrash/Petal Dance and Wrap/Bind re-issue the locked move ignoring the
player’s choice, Fly/Dig/Solar Beam strike on the second turn, and Hyper
Beam recharge forces inaction (BattleAction::Nothing). The game reads
its own effects arena (the cross-turn home of the lock counter / charge
flag / recharge flag) and returns Some(forced) to override chosen, or
None to let the chosen action stand. Read moreSource§fn effect_for_ability(
&self,
b: &BattlerState<Self>,
) -> Option<&'static Effect<Self>>where
Self: Sized,
fn effect_for_ability(
&self,
b: &BattlerState<Self>,
) -> Option<&'static Effect<Self>>where
Self: Sized,
Effect registered for a battler’s ability, hosted on
that battler (design §2.4). Returns None (the default) when the game
has no abilities or this one registers no stack hooks.Source§fn effect_for_item(
&self,
b: &BattlerState<Self>,
) -> Option<&'static Effect<Self>>where
Self: Sized,
fn effect_for_item(
&self,
b: &BattlerState<Self>,
) -> Option<&'static Effect<Self>>where
Self: Sized,
Effect registered for a battler’s held item, hosted
on that battler (design §2.4). Returns None (the default) when the game
has no items or this one registers no stack hooks.Source§fn side_effects(
&self,
ctx: &BattleCtx<'_, Self>,
side: u8,
) -> &[&'static Effect<Self>]where
Self: Sized,
fn side_effects(
&self,
ctx: &BattleCtx<'_, Self>,
side: u8,
) -> &[&'static Effect<Self>]where
Self: Sized,
side (screens, hazards, Wish;
design §2.4). Returns &[] (the default) when the game has no side
conditions. Read moreSource§fn field_effects(&self, ctx: &BattleCtx<'_, Self>) -> &[&'static Effect<Self>]where
Self: Sized,
fn field_effects(&self, ctx: &BattleCtx<'_, Self>) -> &[&'static Effect<Self>]where
Self: Sized,
&[] (the default) when the game has no field
conditions. The returned slice borrows from self (see
side_effects).Source§impl RuleBindings<GenericProvider> for GenericBindings
impl RuleBindings<GenericProvider> for GenericBindings
Source§fn type_chart_mult(
&self,
ctx: &BattleCtx<'_, GenericProvider>,
move_type_index: usize,
defender: BattlerRef,
) -> (u32, u32)
fn type_chart_mult( &self, ctx: &BattleCtx<'_, GenericProvider>, move_type_index: usize, defender: BattlerRef, ) -> (u32, u32)
The chart fold for the in-flight move type vs the defender’s element,
read from the COMPILED RON type_chart (the data layer owns the
relation). An untyped defender is neutral.
Source§fn apply_boost(
&self,
b: &mut BattlerState<GenericProvider>,
stat_index: usize,
stages: i8,
) -> bool
fn apply_boost( &self, b: &mut BattlerState<GenericProvider>, stat_index: usize, stages: i8, ) -> bool
who for the interned stat_index.
Returns false if the index is unknown (a no-op; the loader validates
names at compile, so this is defense-in-depth). Phase 1 applies directly;
the nested-TryBoost veto is driver orchestration (doc 11 §3).Source§fn set_status(
&self,
b: &mut BattlerState<GenericProvider>,
status_index: usize,
) -> bool
fn set_status( &self, b: &mut BattlerState<GenericProvider>, status_index: usize, ) -> bool
who’s non-volatile status for the interned status_index. Returns
false if the index is unknown.Source§fn has_type(&self, b: &BattlerState<GenericProvider>, type_index: usize) -> bool
fn has_type(&self, b: &BattlerState<GenericProvider>, type_index: usize) -> bool
who has the type with interned chart type_index (the HasType
predicate, doc 11 §1.1). Pure read.Source§fn make_volatile(&self, name: &str, amount: u16) -> Option<VolatileKind>
fn make_volatile(&self, name: &str, amount: u16) -> Option<VolatileKind>
P::EffectStateKind volatile for the vocabulary
name + already-resolved amount (the InflictVolatile
op). The engine installs whatever is returned generically (fresh arena
id) and never learns what the volatile means — only the game does.
Defaulted to None ⇒ a game with no volatiles (or that doesn’t
recognise name) makes the op inert. Pure — the engine already drew any
rng needed for amount.Source§fn has_volatile(
&self,
ctx: &BattleCtx<'_, GenericProvider>,
who: BattlerRef,
name: &str,
) -> bool
fn has_volatile( &self, ctx: &BattleCtx<'_, GenericProvider>, who: BattlerRef, name: &str, ) -> bool
who currently has the live volatile named by name (the
HasVolatile predicate, blueprint 15 §2/§3 — the Substitute block on
side-status). The game inspects its own ctx.effects arena (the engine
treats EffectStateKind opaquely, so only the game can tell which arena
entry IS “Substitute”). Defaulted to false so a game with no volatiles
(every game built so far) is unaffected and the predicate never matches.
Pure read; no entropy.Source§fn battler_level(&self, b: &BattlerState<GenericProvider>) -> u16
fn battler_level(&self, b: &BattlerState<GenericProvider>) -> u16
b (the LevelGE predicate’s gate + the level-based
SetDamage sources — Seismic Toss / Night Shade /
Psywave; blueprint 15 §2/§3). BattlerState<P>
carries no level field (the engine is level-agnostic), so the game answers
it here. Defaulted to 0 ⇒ a game that authors no level-gated op is
unaffected (it never calls this) and LevelGE is 0 >= 0 == true. Pure
read; no entropy. Game-agnostic: “a number the binding supplies per battler”.Source§fn has_status(
&self,
b: &BattlerState<GenericProvider>,
status_index: usize,
) -> bool
fn has_status( &self, b: &BattlerState<GenericProvider>, status_index: usize, ) -> bool
who currently has the non-volatile status at interned
status_index (the TargetHasStatus predicate — the Dream Eater sleep
gate, blueprint 15 §2). The status index is the game’s vocabulary (the same
indices set_status consumes). Defaulted to false ⇒ a game that does
not implement it never matches. Pure read; no entropy.Source§fn has_any_status(&self, b: &BattlerState<GenericProvider>) -> bool
fn has_any_status(&self, b: &BattlerState<GenericProvider>) -> bool
b has ANY non-volatile status (the TargetHasAnyStatus
predicate — the Toxic “already-statused ⇒ fail” guard). The engine knows
no concrete status, so the game answers. Defaulted to false ⇒ a game
that doesn’t implement it never matches. Pure read; no entropy.Source§fn set_status_with_amount(
&self,
b: &mut BattlerState<P>,
status_index: usize,
_amount: u16,
) -> bool
fn set_status_with_amount( &self, b: &mut BattlerState<P>, status_index: usize, _amount: u16, ) -> bool
who’s non-volatile status carrying a game-interpreted numeric
amount (e.g. Gen-1 sleep turns). The engine resolves amount from the
op’s AmountSpec — drawing its OWN rng — and hands
the pure number here. Defaulted to delegate to
set_status and ignore the amount, so a game whose
statuses carry no duration is unaffected. Pure; no entropy.Source§fn current_stat_index(&self, _ctx: &BattleCtx<'_, P>) -> Option<usize>
fn current_stat_index(&self, _ctx: &BattleCtx<'_, P>) -> Option<usize>
StatIs predicate (the Sandstorm WeatherModifyStat case, doc 11 §1).
Default None ⇒ StatIs never matches. Pure.Source§fn redirect_hp_loss(
&self,
_ctx: &mut BattleCtx<'_, P>,
_who: BattlerRef,
_source: BattlerRef,
_amount: u16,
) -> bool
fn redirect_hp_loss( &self, _ctx: &mut BattleCtx<'_, P>, _who: BattlerRef, _source: BattlerRef, _amount: u16, ) -> bool
SetHp / DamageFraction
/ DamageCurrentHpFraction / RepeatHits) that apply HP OUTSIDE the driver’s
Event::Damage fold. Before such an op subtracts amount HP from who
(attributed to source), the interpreter asks the game whether a damage sink
on who should swallow it instead — a monster Substitute doll, a cross-game
shield/ward/decoy. Returning true means the game HANDLED the loss (it mutated
its own sink via ctx); the interpreter then SKIPS the direct HP write. Returning
false (the default) leaves the op to apply HP exactly as before. Read moreSource§fn move_type_is_defender_type(
&self,
ctx: &BattleCtx<'_, P>,
move_type_index: usize,
who: BattlerRef,
) -> bool
fn move_type_is_defender_type( &self, ctx: &BattleCtx<'_, P>, move_type_index: usize, who: BattlerRef, ) -> bool
move_type_index, recovered from the
record’s type:) equals one of who’s types (the MoveTypeIsDefenderType
predicate — Gen-1 burn/freeze/paralyze self-type-immunity quirk #23,
blueprint 15 §2/§3). Defaulted to false ⇒ the quirk never fires for a
game that does not implement it. Pure read; no entropy. The default body
delegates to has_type so a game whose has_type already
answers chart membership gets the quirk for free by overriding nothing — but
the engine has no move_type_index for a generic predicate, so the loader
passes it through and the binding decides.Source§fn resource_id(&self, resource_index: usize) -> u16
fn resource_id(&self, resource_index: usize) -> u16
resources: order) to the
engine’s opaque resource id used in ResourcePool
/ BattleProvider::move_cost
(the MP/SP/mana cost gate, doc 13 §4). Defaulted so games with no
resources need not implement it — they never reference a resource, so it is
never called. Default: identity (index as u16). Pure.Source§fn can_pay_resource(
&self,
b: &BattlerState<P>,
resource_index: usize,
amount: u16,
) -> bool
fn can_pay_resource( &self, b: &BattlerState<P>, resource_index: usize, amount: u16, ) -> bool
b can pay amount of the resource at interned resource_index
(the PayResource op’s gate, doc 13 §4). Pure read. The default delegates
to the engine’s ResourcePool via
resource_id — a game that stores its pool on
BattlerState.resources (the engine default) gets correct behavior for free.Source§fn pay_resource(
&self,
b: &mut BattlerState<P>,
resource_index: usize,
amount: u16,
)
fn pay_resource( &self, b: &mut BattlerState<P>, resource_index: usize, amount: u16, )
amount of the resource at interned resource_index from b (the
PayResource op’s deduction). Pure arithmetic — no rng. Default
delegates to the engine ResourcePool.Source§impl RulesProvider for GenericProvider
impl RulesProvider for GenericProvider
Source§type Bindings = GenericBindings
type Bindings = GenericBindings
P::Stat/P::Status
and supplying the chart fold.Source§fn compiled(&self) -> &CompiledRuleset
fn compiled(&self) -> &CompiledRuleset
source_effect). Typically a &'static built once via OnceLock.Source§fn rules_host() -> Option<&'static RulesHost<GenericProvider>>
fn rules_host() -> Option<&'static RulesHost<GenericProvider>>
ctx for the interpreter. The interpreter only has
&mut BattleCtx, which does NOT carry &P (the engine’s borrow
discipline). A game whose chart/registry is a &'static (the common case)
returns it here without touching ctx; the default points at that static.
Returns None if no static is installed.Auto Trait Implementations§
impl Freeze for GenericProvider
impl RefUnwindSafe for GenericProvider
impl Send for GenericProvider
impl Sync for GenericProvider
impl Unpin for GenericProvider
impl UnsafeUnpin for GenericProvider
impl UnwindSafe for GenericProvider
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreimpl<T> MaybeSendSync for T
Source§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read moreSource§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
Source§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.