Struct midenc_hir::DefaultInstBuilder
source · pub struct DefaultInstBuilder<'f> { /* private fields */ }Implementations§
source§impl<'f> DefaultInstBuilder<'f>
impl<'f> DefaultInstBuilder<'f>
pub fn at(dfg: &'f mut DataFlowGraph, ip: InsertionPoint) -> Self
Trait Implementations§
source§impl<'f> InstBuilderBase<'f> for DefaultInstBuilder<'f>
impl<'f> InstBuilderBase<'f> for DefaultInstBuilder<'f>
source§fn data_flow_graph(&self) -> &DataFlowGraph
fn data_flow_graph(&self) -> &DataFlowGraph
Get a reference to the underlying DataFlowGraph for this builder
source§fn data_flow_graph_mut(&mut self) -> &mut DataFlowGraph
fn data_flow_graph_mut(&mut self) -> &mut DataFlowGraph
Get a mutable reference to the underlying DataFlowGraph for this builder
source§fn insertion_point(&self) -> InsertionPoint
fn insertion_point(&self) -> InsertionPoint
Return the insertion point of this builder
source§fn build(
self,
data: Instruction,
ty: Type,
span: SourceSpan,
) -> (Inst, &'f mut DataFlowGraph)
fn build( self, data: Instruction, ty: Type, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
Build the given instruction, returing it’s handle and the inner DataFlowGraph
source§fn ins<'a, 'b: 'a>(&'b mut self) -> DefaultInstBuilder<'a>
fn ins<'a, 'b: 'a>(&'b mut self) -> DefaultInstBuilder<'a>
Get a default instruction builder using the dataflow graph and insertion point of the
current builder
Auto Trait Implementations§
impl<'f> Freeze for DefaultInstBuilder<'f>
impl<'f> !RefUnwindSafe for DefaultInstBuilder<'f>
impl<'f> !Send for DefaultInstBuilder<'f>
impl<'f> !Sync for DefaultInstBuilder<'f>
impl<'f> Unpin for DefaultInstBuilder<'f>
impl<'f> !UnwindSafe for DefaultInstBuilder<'f>
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<'f, T> InstBuilder<'f> for Twhere
T: InstBuilderBase<'f>,
impl<'f, T> InstBuilder<'f> for Twhere
T: InstBuilderBase<'f>,
fn assert(self, value: Value, span: SourceSpan) -> Inst
fn assert_with_error(self, value: Value, code: u32, span: SourceSpan) -> Inst
fn assertz(self, value: Value, span: SourceSpan) -> Inst
fn assertz_with_error(self, value: Value, code: u32, span: SourceSpan) -> Inst
fn assert_eq(self, lhs: Value, rhs: Value, span: SourceSpan) -> Inst
fn assert_eq_imm(self, lhs: Immediate, rhs: Value, span: SourceSpan) -> Inst
fn i1(self, imm: bool, span: SourceSpan) -> Value
fn u8(self, imm: u8, span: SourceSpan) -> Value
fn i8(self, imm: i8, span: SourceSpan) -> Value
fn u16(self, imm: u16, span: SourceSpan) -> Value
fn i16(self, imm: i16, span: SourceSpan) -> Value
fn u32(self, imm: u32, span: SourceSpan) -> Value
fn i32(self, imm: i32, span: SourceSpan) -> Value
fn u64(self, imm: u64, span: SourceSpan) -> Value
fn i64(self, imm: i64, span: SourceSpan) -> Value
fn u128(self, imm: u128, span: SourceSpan) -> Value
fn i128(self, imm: i128, span: SourceSpan) -> Value
fn felt(self, i: Felt, span: SourceSpan) -> Value
fn f64(self, f: f64, span: SourceSpan) -> Value
fn character(self, c: char, span: SourceSpan) -> Value
fn alloca(self, ty: Type, span: SourceSpan) -> Value
source§fn mem_grow(self, num_pages: Value, span: SourceSpan) -> Value
fn mem_grow(self, num_pages: Value, span: SourceSpan) -> Value
Grow the global heap by
num_pages pages, in 64kb units. Read moresource§fn mem_size(self, span: SourceSpan) -> Value
fn mem_size(self, span: SourceSpan) -> Value
Return the size of the global heap in pages, where each page is 64kb.
source§fn symbol<S: AsRef<str>>(self, name: S, span: SourceSpan) -> GlobalValue
fn symbol<S: AsRef<str>>(self, name: S, span: SourceSpan) -> GlobalValue
source§fn symbol_relative<S: AsRef<str>>(
self,
name: S,
offset: i32,
span: SourceSpan,
) -> GlobalValue
fn symbol_relative<S: AsRef<str>>( self, name: S, offset: i32, span: SourceSpan, ) -> GlobalValue
Same semantics as
symbol, but applies a constant offset to the address of the given
symbol. Read moresource§fn symbol_addr<S: AsRef<str>>(
self,
name: S,
ty: Type,
span: SourceSpan,
) -> Value
fn symbol_addr<S: AsRef<str>>( self, name: S, ty: Type, span: SourceSpan, ) -> Value
Get the address of a global variable whose symbol is
name Read moresource§fn symbol_relative_addr<S: AsRef<str>>(
self,
name: S,
offset: i32,
ty: Type,
span: SourceSpan,
) -> Value
fn symbol_relative_addr<S: AsRef<str>>( self, name: S, offset: i32, ty: Type, span: SourceSpan, ) -> Value
Same semantics as
symbol_addr, but applies a constant offset to the address of the given
symbol. Read moresource§fn load_symbol<S: AsRef<str>>(
self,
name: S,
ty: Type,
span: SourceSpan,
) -> Value
fn load_symbol<S: AsRef<str>>( self, name: S, ty: Type, span: SourceSpan, ) -> Value
source§fn load_symbol_relative<S: AsRef<str>>(
self,
name: S,
ty: Type,
offset: i32,
span: SourceSpan,
) -> Value
fn load_symbol_relative<S: AsRef<str>>( self, name: S, ty: Type, offset: i32, span: SourceSpan, ) -> Value
Same semantics as
load_symbol, but a constant offset is applied to the address before
issuing the load.source§fn load_global(self, addr: GlobalValue, ty: Type, span: SourceSpan) -> Value
fn load_global(self, addr: GlobalValue, ty: Type, span: SourceSpan) -> Value
source§fn load_global_relative(
self,
base: GlobalValue,
ty: Type,
offset: i32,
span: SourceSpan,
) -> Value
fn load_global_relative( self, base: GlobalValue, ty: Type, offset: i32, span: SourceSpan, ) -> Value
Same semantics as
load_global_relative, but a constant offset is applied to the address
before issuing the load.source§fn global_addr_offset(
self,
base: GlobalValue,
offset: i32,
unit_ty: Type,
span: SourceSpan,
) -> Value
fn global_addr_offset( self, base: GlobalValue, offset: i32, unit_ty: Type, span: SourceSpan, ) -> Value
Computes an address relative to the pointer produced by
base, by applying an offset
given by multiplying offset * the size in bytes of unit_ty. Read moresource§fn load(self, addr: Value, span: SourceSpan) -> Value
fn load(self, addr: Value, span: SourceSpan) -> Value
Loads a value of the type pointed to by the given pointer, on to the stack Read more
source§fn load_local(self, local: LocalId, span: SourceSpan) -> Value
fn load_local(self, local: LocalId, span: SourceSpan) -> Value
Loads a value from the given temporary (local variable), of the type associated with that
local.
source§fn store_local(self, local: LocalId, value: Value, span: SourceSpan) -> Inst
fn store_local(self, local: LocalId, value: Value, span: SourceSpan) -> Inst
Stores
value to the given temporary (local variable). Read moresource§fn ptrtoint(self, arg: Value, ty: Type, span: SourceSpan) -> Value
fn ptrtoint(self, arg: Value, ty: Type, span: SourceSpan) -> Value
This is a cast operation that permits performing arithmetic on pointer values
by casting a pointer to a specified integral type.
source§fn inttoptr(self, arg: Value, ty: Type, span: SourceSpan) -> Value
fn inttoptr(self, arg: Value, ty: Type, span: SourceSpan) -> Value
This is the inverse of
ptrtoint, used to recover a pointer that was
previously cast to an integer type. It may also be used to cast arbitrary
integer values to pointers. Read moresource§fn getelementptr(self, ptr: Value, indices: &[usize], span: SourceSpan) -> Value
fn getelementptr(self, ptr: Value, indices: &[usize], span: SourceSpan) -> Value
This is an intrinsic which derives a new pointer from an existing pointer to an aggregate. Read more
source§fn trunc(self, arg: Value, ty: Type, span: SourceSpan) -> Value
fn trunc(self, arg: Value, ty: Type, span: SourceSpan) -> Value
Truncates an integral value as necessary to fit in
ty. Read moresource§fn zext(self, arg: Value, ty: Type, span: SourceSpan) -> Value
fn zext(self, arg: Value, ty: Type, span: SourceSpan) -> Value
Extends an integer into a larger integeral type, by zero-extending the value,
i.e. the new high-order bits of the resulting value will be all zero. Read more
source§fn sext(self, arg: Value, ty: Type, span: SourceSpan) -> Value
fn sext(self, arg: Value, ty: Type, span: SourceSpan) -> Value
Extends an integer into a larger integeral type, by sign-extending the value,
i.e. the new high-order bits of the resulting value will all match the sign bit. Read more
fn add_checked(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn add_unchecked(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn add_wrapping(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn add_overflowing(self, lhs: Value, rhs: Value, span: SourceSpan) -> Inst
fn add_imm_checked(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn add_imm_unchecked( self, lhs: Value, imm: Immediate, span: SourceSpan, ) -> Value
fn add_imm_wrapping(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn add_imm_overflowing( self, lhs: Value, imm: Immediate, span: SourceSpan, ) -> Inst
fn sub_checked(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn sub_unchecked(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn sub_wrapping(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn sub_overflowing(self, lhs: Value, rhs: Value, span: SourceSpan) -> Inst
fn sub_imm_checked(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn sub_imm_unchecked( self, lhs: Value, imm: Immediate, span: SourceSpan, ) -> Value
fn sub_imm_wrapping(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn sub_imm_overflowing( self, lhs: Value, imm: Immediate, span: SourceSpan, ) -> Inst
fn mul_checked(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn mul_unchecked(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn mul_wrapping(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn mul_overflowing(self, lhs: Value, rhs: Value, span: SourceSpan) -> Inst
fn mul_imm_checked(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn mul_imm_unchecked( self, lhs: Value, imm: Immediate, span: SourceSpan, ) -> Value
fn mul_imm_wrapping(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn mul_imm_overflowing( self, lhs: Value, imm: Immediate, span: SourceSpan, ) -> Inst
fn div_checked(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn div_unchecked(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn div_imm_checked(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn div_imm_unchecked( self, lhs: Value, imm: Immediate, span: SourceSpan, ) -> Value
fn min(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn min_imm(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn max(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn max_imm(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn mod_checked(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn mod_unchecked(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn mod_imm_checked(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn mod_imm_unchecked( self, lhs: Value, imm: Immediate, span: SourceSpan, ) -> Value
fn divmod_checked(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn divmod_unchecked(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn divmod_imm_checked( self, lhs: Value, imm: Immediate, span: SourceSpan, ) -> Value
fn divmod_imm_unchecked( self, lhs: Value, imm: Immediate, span: SourceSpan, ) -> Value
fn exp(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn exp_imm(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn and(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn and_imm(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn band(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn band_imm(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn or(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn or_imm(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn bor(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn bor_imm(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn xor(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn xor_imm(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn bxor(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn bxor_imm(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn neg(self, rhs: Value, span: SourceSpan) -> Value
fn inv(self, rhs: Value, span: SourceSpan) -> Value
fn incr_checked(self, rhs: Value, span: SourceSpan) -> Value
fn incr_unchecked(self, rhs: Value, span: SourceSpan) -> Value
fn incr_wrapping(self, rhs: Value, span: SourceSpan) -> Value
fn incr_overflowing(self, rhs: Value, span: SourceSpan) -> Inst
fn ilog2(self, rhs: Value, span: SourceSpan) -> Value
fn pow2(self, rhs: Value, span: SourceSpan) -> Value
fn not(self, rhs: Value, span: SourceSpan) -> Value
fn bnot(self, rhs: Value, span: SourceSpan) -> Value
fn popcnt(self, rhs: Value, span: SourceSpan) -> Value
fn clz(self, rhs: Value, span: SourceSpan) -> Value
fn ctz(self, rhs: Value, span: SourceSpan) -> Value
fn clo(self, rhs: Value, span: SourceSpan) -> Value
fn cto(self, rhs: Value, span: SourceSpan) -> Value
fn rotl(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn rotl_imm(self, lhs: Value, shift: u32, span: SourceSpan) -> Value
fn rotr(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn rotr_imm(self, lhs: Value, shift: u32, span: SourceSpan) -> Value
fn shl(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn shl_imm(self, lhs: Value, shift: u32, span: SourceSpan) -> Value
fn shr(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn shr_imm(self, lhs: Value, shift: u32, span: SourceSpan) -> Value
fn eq(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn eq_imm(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn neq(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn neq_imm(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn gt(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn gt_imm(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn gte(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn gte_imm(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn lt(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn lt_imm(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn lte(self, lhs: Value, rhs: Value, span: SourceSpan) -> Value
fn lte_imm(self, lhs: Value, imm: Immediate, span: SourceSpan) -> Value
fn is_odd(self, value: Value, span: SourceSpan) -> Value
fn call(self, callee: FunctionIdent, args: &[Value], span: SourceSpan) -> Inst
fn syscall( self, callee: FunctionIdent, args: &[Value], span: SourceSpan, ) -> Inst
fn select(self, cond: Value, a: Value, b: Value, span: SourceSpan) -> Value
fn br(self, block: Block, args: &[Value], span: SourceSpan) -> Inst
fn cond_br( self, cond: Value, then_dest: Block, then_args: &[Value], else_dest: Block, else_args: &[Value], span: SourceSpan, ) -> Inst
fn switch(self, arg: Value, span: SourceSpan) -> SwitchBuilder<'f, Self>
fn ret(self, returning: Option<Value>, span: SourceSpan) -> Inst
fn ret_imm(self, arg: Immediate, span: SourceSpan) -> Inst
fn unreachable(self, span: SourceSpan) -> Inst
fn inline_asm( self, args: &[Value], results: impl IntoIterator<Item = Type>, span: SourceSpan, ) -> MasmBuilder<Self>
fn CondBr( self, cond: Value, then_dest: Block, then_args: ValueList, else_dest: Block, else_args: ValueList, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
fn Br( self, op: Opcode, ty: Type, destination: Block, args: ValueList, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
fn Switch( self, arg: Value, arms: Vec<SwitchArm>, default: Successor, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
fn Ret(self, args: ValueList, span: SourceSpan) -> (Inst, &'f mut DataFlowGraph)
fn Call( self, op: Opcode, callee: FunctionIdent, args: ValueList, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
fn Binary( self, op: Opcode, ty: Type, lhs: Value, rhs: Value, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
fn BinaryWithOverflow( self, op: Opcode, ty: Type, lhs: Value, rhs: Value, overflow: Overflow, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
fn BinaryImm( self, op: Opcode, ty: Type, arg: Value, imm: Immediate, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
fn BinaryImmWithOverflow( self, op: Opcode, ty: Type, arg: Value, imm: Immediate, overflow: Overflow, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
fn Unary( self, op: Opcode, ty: Type, arg: Value, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
fn UnaryWithOverflow( self, op: Opcode, ty: Type, arg: Value, overflow: Overflow, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
fn UnaryImm( self, op: Opcode, ty: Type, imm: Immediate, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
fn UnaryImmWithOverflow( self, op: Opcode, ty: Type, imm: Immediate, overflow: Overflow, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
fn Test( self, op: Opcode, ret: Type, arg: Value, ty: Type, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
fn PrimOp( self, op: Opcode, ty: Type, args: ValueList, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
fn PrimOpImm( self, op: Opcode, ty: Type, imm: Immediate, args: ValueList, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
fn Global( self, global: GlobalValue, ty: Type, span: SourceSpan, ) -> (Inst, &'f mut DataFlowGraph)
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>
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 moresource§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,
Set the foreground color generically Read more
source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Set the background color generically. Read more
source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Change the foreground color to black
source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Change the background color to black
source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Change the foreground color to red
source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Change the background color to red
source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Change the foreground color to green
source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Change the background color to green
source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Change the foreground color to yellow
source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Change the background color to yellow
source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Change the foreground color to blue
source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Change the background color to blue
source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Change the foreground color to magenta
source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Change the background color to magenta
source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Change the foreground color to purple
source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Change the background color to purple
source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Change the foreground color to cyan
source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Change the background color to cyan
source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Change the foreground color to white
source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Change the background color to white
source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Change the foreground color to the terminal default
source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Change the background color to the terminal default
source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Change the foreground color to bright black
source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Change the background color to bright black
source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Change the foreground color to bright red
source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Change the background color to bright red
source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Change the foreground color to bright green
source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Change the background color to bright green
source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Change the foreground color to bright yellow
source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Change the background color to bright yellow
source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Change the foreground color to bright blue
source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Change the background color to bright blue
source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Change the foreground color to bright magenta
source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Change the background color to bright magenta
source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Change the foreground color to bright purple
source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Change the background color to bright purple
source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Change the foreground color to bright cyan
source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Change the background color to bright cyan
source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Change the foreground color to bright white
source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Change the background color to bright white
source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Make the text bold
source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Make the text dim
source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Make the text italicized
source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Make the text italicized
source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Make the text blink
source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Make the text blink (but fast!)
source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Swap the foreground and background colors
Hide the text
source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Cross out the text
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,
Set the foreground color at runtime. Only use if you do not know which color will be used at
compile-time. If the color is constant, use either
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,
Set the background color at runtime. Only use if you do not know what color to use at
compile-time. If the color is constant, use either
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>
Set the foreground color to a specific RGB value.
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>
Set the background color to a specific RGB value.
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>
Sets the foreground color to an RGB value.
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>
Sets the background color to an RGB value.