pub struct ChunkGraph { /* private fields */ }Implementations§
Source§impl ChunkGraph
impl ChunkGraph
pub fn add_chunk(&mut self, chunk_ukey: ChunkUkey)
pub fn remove_chunk( &mut self, chunk_ukey: &ChunkUkey, ) -> Option<ChunkGraphChunk>
pub fn add_chunk_wit_chunk_graph_chunk( &mut self, chunk_ukey: ChunkUkey, cgc: ChunkGraphChunk, )
pub fn replace_module( &mut self, old_module_id: &ModuleIdentifier, new_module_id: &ModuleIdentifier, )
pub fn get_chunk_entry_modules( &self, chunk_ukey: &ChunkUkey, ) -> Vec<ModuleIdentifier> ⓘ
pub fn get_chunk_entry_modules_with_chunk_group_iterable( &self, chunk_ukey: &ChunkUkey, ) -> &IdentifierLinkedMap<ChunkGroupUkey>
pub fn expect_chunk_graph_chunk_mut( &mut self, chunk_ukey: ChunkUkey, ) -> &mut ChunkGraphChunk
pub fn expect_chunk_graph_chunk( &self, chunk_ukey: &ChunkUkey, ) -> &ChunkGraphChunk
pub fn get_chunk_graph_chunk( &self, chunk_ukey: &ChunkUkey, ) -> Option<&ChunkGraphChunk>
pub fn get_chunk_graph_chunk_mut( &mut self, chunk_ukey: &ChunkUkey, ) -> Option<&mut ChunkGraphChunk>
pub fn connect_chunk_and_entry_module( &mut self, chunk: ChunkUkey, module_identifier: ModuleIdentifier, entrypoint: ChunkGroupUkey, )
pub fn disconnect_chunk_and_module( &mut self, chunk: &ChunkUkey, module_identifier: ModuleIdentifier, )
pub fn connect_chunk_and_module( &mut self, chunk: ChunkUkey, module_identifier: ModuleIdentifier, )
pub fn connect_chunk_and_runtime_module( &mut self, chunk: ChunkUkey, module_identifier: ModuleIdentifier, )
pub fn disconnect_chunk_and_runtime_module( &mut self, chunk: &ChunkUkey, module_identifier: &ModuleIdentifier, )
pub fn disconnect_chunks_and_modules( &mut self, chunks: &[ChunkUkey], modules: &[ModuleIdentifier], )
pub fn connect_chunk_and_modules( &mut self, chunk: ChunkUkey, modules: &[ModuleIdentifier], )
pub fn get_chunk_modules<'module>( &self, chunk: &ChunkUkey, module_graph: &'module ModuleGraph<'_>, ) -> Vec<&'module BoxModule>
Sourcepub fn get_chunk_modules_identifier(&self, chunk: &ChunkUkey) -> &IdentifierSet
pub fn get_chunk_modules_identifier(&self, chunk: &ChunkUkey) -> &IdentifierSet
Get all identifiers of chunk modules, including runtime modules
Sourcepub fn get_ordered_chunk_modules_identifier(
&self,
chunk: &ChunkUkey,
) -> Vec<ModuleIdentifier> ⓘ
pub fn get_ordered_chunk_modules_identifier( &self, chunk: &ChunkUkey, ) -> Vec<ModuleIdentifier> ⓘ
Get ordered identifiers of chunk modules, including runtime modules
Sourcepub fn get_ordered_chunk_modules<'module>(
&self,
chunk: &ChunkUkey,
module_graph: &'module ModuleGraph<'_>,
) -> Vec<&'module BoxModule>
pub fn get_ordered_chunk_modules<'module>( &self, chunk: &ChunkUkey, module_graph: &'module ModuleGraph<'_>, ) -> Vec<&'module BoxModule>
Get ordered modules of chunk, including runtime modules
Sourcepub fn has_chunk_module_by_source_type(
&self,
chunk: &ChunkUkey,
source_type: SourceType,
module_graph: &ModuleGraph<'_>,
) -> bool
pub fn has_chunk_module_by_source_type( &self, chunk: &ChunkUkey, source_type: SourceType, module_graph: &ModuleGraph<'_>, ) -> bool
Check if the chunk has a module with the given source type
returning false if source type is Runtime
Sourcepub fn get_chunk_modules_by_source_type<'module>(
&self,
chunk: &ChunkUkey,
source_type: SourceType,
module_graph: &'module ModuleGraph<'_>,
) -> Vec<&'module dyn Module>
pub fn get_chunk_modules_by_source_type<'module>( &self, chunk: &ChunkUkey, source_type: SourceType, module_graph: &'module ModuleGraph<'_>, ) -> Vec<&'module dyn Module>
Get chunk modules by source type
returning empty vector if source type is Runtime
Sourcepub fn get_chunk_modules_identifier_by_source_type(
&self,
chunk: &ChunkUkey,
source_type: SourceType,
module_graph: &ModuleGraph<'_>,
) -> Vec<ModuleIdentifier> ⓘ
pub fn get_chunk_modules_identifier_by_source_type( &self, chunk: &ChunkUkey, source_type: SourceType, module_graph: &ModuleGraph<'_>, ) -> Vec<ModuleIdentifier> ⓘ
Get identifiers of chunk modules by source type
returning empty vector if source type is Runtime
pub fn get_chunk_modules_size( &self, chunk: &ChunkUkey, compilation: &Compilation, ) -> f64
pub fn get_chunk_modules_sizes( &self, chunk: &ChunkUkey, compilation: &Compilation, ) -> HashMap<SourceType, f64>
pub fn get_number_of_chunk_modules(&self, chunk: &ChunkUkey) -> usize
pub fn get_number_of_entry_modules(&self, chunk: &ChunkUkey) -> usize
pub fn has_chunk_full_hash_modules( &self, chunk: &ChunkUkey, runtime_modules: &IdentifierMap<Box<dyn RuntimeModule>>, ) -> bool
pub fn has_chunk_dependent_hash_modules( &self, chunk: &ChunkUkey, runtime_modules: &IdentifierMap<Box<dyn RuntimeModule>>, ) -> bool
pub fn set_chunk_runtime_requirements( compilation: &mut Compilation, chunk_ukey: ChunkUkey, runtime_requirements: RuntimeGlobals, )
pub fn set_tree_runtime_requirements( compilation: &mut Compilation, chunk_ukey: ChunkUkey, runtime_requirements: RuntimeGlobals, )
pub fn get_chunk_runtime_requirements<'a>( compilation: &'a Compilation, chunk_ukey: &ChunkUkey, ) -> &'a RuntimeGlobals
pub fn get_tree_runtime_requirements<'a>( compilation: &'a Compilation, chunk_ukey: &ChunkUkey, ) -> &'a RuntimeGlobals
pub fn get_chunk_runtime_modules_in_order<'a>( &self, chunk_ukey: &ChunkUkey, compilation: &'a Compilation, ) -> impl Iterator<Item = (&ModuleIdentifier, &'a dyn RuntimeModule)>
pub fn get_chunk_runtime_modules_iterable( &self, chunk_ukey: &ChunkUkey, ) -> impl Iterator<Item = &ModuleIdentifier>
pub fn has_chunk_runtime_modules(&self, chunk_ukey: &ChunkUkey) -> bool
pub fn get_chunk_condition_map<F: Fn(&ChunkUkey, &Compilation) -> bool>( &self, chunk_ukey: &ChunkUkey, compilation: &Compilation, filter: F, ) -> HashMap<String, bool>
pub fn get_chunk_root_modules( &self, chunk: &ChunkUkey, module_graph: &ModuleGraph<'_>, module_graph_cache: &ModuleGraphCacheArtifact, ) -> Vec<ModuleIdentifier> ⓘ
pub fn disconnect_chunk( &mut self, chunk: &mut Chunk, chunk_group_by_ukey: &mut ChunkGroupByUkey, )
pub fn has_chunk_entry_dependent_chunks( &self, chunk_ukey: &ChunkUkey, chunk_group_by_ukey: &ChunkGroupByUkey, ) -> bool
pub fn get_runtime_chunk_dependent_chunks_iterable( &self, chunk_ukey: &ChunkUkey, chunk_by_ukey: &ChunkByUkey, chunk_group_by_ukey: &ChunkGroupByUkey, ) -> impl Iterator<Item = ChunkUkey>
pub fn get_chunk_entry_dependent_chunks_iterable( &self, chunk_ukey: &ChunkUkey, chunk_by_ukey: &ChunkByUkey, chunk_group_by_ukey: &ChunkGroupByUkey, ) -> impl Iterator<Item = ChunkUkey>
pub fn disconnect_chunk_and_entry_module( &mut self, chunk: &ChunkUkey, module_identifier: ModuleIdentifier, )
pub fn can_chunks_be_integrated( &self, chunk_a_ukey: &ChunkUkey, chunk_b_ukey: &ChunkUkey, chunk_by_ukey: &ChunkByUkey, chunk_group_by_ukey: &ChunkGroupByUkey, ) -> bool
pub fn get_chunk_size( &self, chunk_ukey: &ChunkUkey, options: &ChunkSizeOptions, chunk_by_ukey: &ChunkByUkey, chunk_group_by_ukey: &ChunkGroupByUkey, module_graph: &ModuleGraph<'_>, compilation: &Compilation, ) -> f64
pub fn get_integrated_chunks_size( &self, chunk_a_ukey: &ChunkUkey, chunk_b_ukey: &ChunkUkey, options: &ChunkSizeOptions, chunk_by_ukey: &ChunkByUkey, chunk_group_by_ukey: &ChunkGroupByUkey, module_graph: &ModuleGraph<'_>, compilation: &Compilation, ) -> f64
pub fn integrate_chunks( &mut self, a: &ChunkUkey, b: &ChunkUkey, chunk_by_ukey: &mut ChunkByUkey, chunk_group_by_ukey: &mut ChunkGroupByUkey, module_graph: &ModuleGraph<'_>, )
pub fn set_runtime_id(&mut self, runtime: String, id: Option<String>)
pub fn get_runtime_id(&self, runtime: &str) -> Option<String>
pub fn set_chunk_modules_source_types( &mut self, chunk: &ChunkUkey, module: ModuleIdentifier, source_types: FxHashSet<SourceType>, )
pub fn get_chunk_module_source_types( &self, chunk: &ChunkUkey, module: &BoxModule, module_graph: &ModuleGraph<'_>, ) -> FxHashSet<SourceType>
pub fn get_chunk_id<'a>( chunk_ids: &'a ChunkIdsArtifact, chunk_ukey: &ChunkUkey, ) -> Option<&'a ChunkId>
pub fn set_chunk_id( chunk_ids: &mut ChunkIdsArtifact, chunk_ukey: ChunkUkey, id: ChunkId, ) -> bool
Source§impl ChunkGraph
impl ChunkGraph
pub fn add_module(&mut self, module_identifier: ModuleIdentifier)
pub fn remove_module(&mut self, module_identifier: ModuleIdentifier)
pub fn is_module_in_chunk( &self, module_identifier: &ModuleIdentifier, chunk_ukey: ChunkUkey, ) -> bool
pub fn is_any_module_in_chunk<'a>( &self, module_identifiers: impl Iterator<Item = &'a ModuleIdentifier>, chunk_ukey: ChunkUkey, ) -> bool
pub fn get_module_chunks( &self, module_identifier: ModuleIdentifier, ) -> &UkeySet<ChunkUkey>
Sourcepub fn get_number_of_module_chunks(
&self,
module_identifier: ModuleIdentifier,
) -> usize
pub fn get_number_of_module_chunks( &self, module_identifier: ModuleIdentifier, ) -> usize
Returns the number of chunks that the specified module is part of.
pub fn set_module_runtime_requirements( compilation: &mut Compilation, module_identifier: ModuleIdentifier, map: RuntimeSpecMap<RuntimeGlobals>, )
pub fn get_module_runtime_requirements<'c>( compilation: &'c Compilation, module_identifier: ModuleIdentifier, runtime: &RuntimeSpec, ) -> Option<&'c RuntimeGlobals>
pub fn get_module_runtimes( &self, module_identifier: ModuleIdentifier, chunk_by_ukey: &ChunkByUkey, ) -> RuntimeSpecSet
pub fn get_module_runtimes_iter<'a>( &self, module_identifier: ModuleIdentifier, chunk_by_ukey: &'a ChunkByUkey, ) -> impl Iterator<Item = &'a RuntimeSpec> + use<'a, '_>
pub fn get_module_id( module_ids: &ModuleIdsArtifact, module_identifier: ModuleIdentifier, ) -> Option<&ModuleId>
pub fn set_module_id( module_ids: &mut ModuleIdsArtifact, module_identifier: ModuleIdentifier, id: ModuleId, ) -> bool
pub fn get_block_chunk_group<'a>( &self, block: &AsyncDependenciesBlockIdentifier, chunk_group_by_ukey: &'a ChunkGroupByUkey, ) -> Option<&'a ChunkGroup>
pub fn connect_block_and_chunk_group( &mut self, block: AsyncDependenciesBlockIdentifier, chunk_group: ChunkGroupUkey, )
pub fn get_module_hash<'c>( compilation: &'c Compilation, module_identifier: ModuleIdentifier, runtime: &RuntimeSpec, ) -> Option<&'c RspackHashDigest>
pub fn set_module_hashes( compilation: &mut Compilation, module_identifier: ModuleIdentifier, hashes: RuntimeSpecMap<RspackHashDigest>, ) -> bool
pub fn try_get_module_chunks( &self, module_identifier: &ModuleIdentifier, ) -> Option<&UkeySet<ChunkUkey>>
pub fn get_module_graph_hash( &self, module: &dyn Module, compilation: &Compilation, runtime: Option<&RuntimeSpec>, ) -> u64
Source§impl ChunkGraph
impl ChunkGraph
pub fn is_entry_module(&self, module_id: &ModuleIdentifier) -> bool
Source§impl ChunkGraph
impl ChunkGraph
pub fn to_dot(&self, compilation: &Compilation) -> Result<String, Error>
pub async fn generate_dot(&self, compilation: &Compilation, dotfile_name: &str)
Trait Implementations§
Source§impl Clone for ChunkGraph
impl Clone for ChunkGraph
Source§fn clone(&self) -> ChunkGraph
fn clone(&self) -> ChunkGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChunkGraph
impl Debug for ChunkGraph
Source§impl Default for ChunkGraph
impl Default for ChunkGraph
Source§fn default() -> ChunkGraph
fn default() -> ChunkGraph
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChunkGraph
impl !RefUnwindSafe for ChunkGraph
impl Send for ChunkGraph
impl Sync for ChunkGraph
impl Unpin for ChunkGraph
impl !UnwindSafe for ChunkGraph
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Causes
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> ImplicitClone for Twhere
T: Clone,
impl<T> ImplicitClone for Twhere
T: Clone,
fn clone_quote_var(&self) -> Self
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<T> IntoTWithDiagnosticArray for Twhere
T: Debug,
impl<T> IntoTWithDiagnosticArray for Twhere
T: Debug,
fn with_diagnostic(self, diagnostic: Vec<Diagnostic>) -> TWithDiagnosticArray<T>where
T: Debug,
fn with_empty_diagnostic(self) -> TWithDiagnosticArray<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
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,
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 underlined
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.
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,
Pipes by value. This is generally the method you want to use. Read more
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,
Borrows
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,
Mutably borrows
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
Borrows
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
Mutably borrows
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
Borrows
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
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
Immutable access to the
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
Mutable access to the
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
Immutable access to the
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
Mutable access to the
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
Immutable access to the
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
Mutable access to the
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
Calls
.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
Calls
.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
Calls
.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
Calls
.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
Calls
.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
Calls
.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
Calls
.tap_deref() only in debug builds, and is erased in release
builds.