pub struct RuntimeModuleFromJs {
pub name: String,
pub generator: Arc<dyn Fn() -> BoxFuture<'static, Result<String>> + Send + Sync>,
pub full_hash: bool,
pub dependent_hash: bool,
pub isolate: bool,
pub stage: RuntimeModuleStage,
pub source_map_kind: SourceMapKind,
pub custom_source: Option<String>,
pub cached_generated_code: Arc<OnceCell<BoxSource>>,
}Fields§
§name: String§generator: Arc<dyn Fn() -> BoxFuture<'static, Result<String>> + Send + Sync>§full_hash: bool§dependent_hash: bool§isolate: bool§stage: RuntimeModuleStage§source_map_kind: SourceMapKind§custom_source: Option<String>§cached_generated_code: Arc<OnceCell<BoxSource>>Trait Implementations§
Source§impl Archive for RuntimeModuleFromJswhere
String: Archive,
Unsupported: ArchiveWith<Arc<dyn Fn() -> BoxFuture<'static, Result<String>> + Send + Sync>>,
bool: Archive,
RuntimeModuleStage: Archive,
SourceMapKind: Archive,
Option<String>: Archive,
Skip: ArchiveWith<Arc<OnceCell<BoxSource>>>,
impl Archive for RuntimeModuleFromJswhere
String: Archive,
Unsupported: ArchiveWith<Arc<dyn Fn() -> BoxFuture<'static, Result<String>> + Send + Sync>>,
bool: Archive,
RuntimeModuleStage: Archive,
SourceMapKind: Archive,
Option<String>: Archive,
Skip: ArchiveWith<Arc<OnceCell<BoxSource>>>,
Source§type Archived = ArchivedRuntimeModuleFromJs
type Archived = ArchivedRuntimeModuleFromJs
The archived representation of this type. Read more
Source§type Resolver = RuntimeModuleFromJsResolver
type Resolver = RuntimeModuleFromJsResolver
The resolver for this type. It must contain all the additional
information from serializing needed to make the archived type from
the normal type.
Source§fn resolve(&self, resolver: Self::Resolver, out: Place<Self::Archived>)
fn resolve(&self, resolver: Self::Resolver, out: Place<Self::Archived>)
Creates the archived version of this value at the given position and
writes it to the given output. Read more
Source§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
An optimization flag that allows the bytes of this type to be copied
directly to a writer instead of calling
serialize. Read moreSource§impl CustomSourceRuntimeModule for RuntimeModuleFromJs
impl CustomSourceRuntimeModule for RuntimeModuleFromJs
fn set_custom_source(&mut self, source: String)
fn get_custom_source(&self) -> Option<String>
fn get_constructor_name(&self) -> String
Source§impl Debug for RuntimeModuleFromJs
impl Debug for RuntimeModuleFromJs
Source§impl DependenciesBlock for RuntimeModuleFromJs
impl DependenciesBlock for RuntimeModuleFromJs
fn add_block_id(&mut self, _: AsyncDependenciesBlockIdentifier)
fn get_blocks(&self) -> &[AsyncDependenciesBlockIdentifier]
fn add_dependency_id(&mut self, _: DependencyId)
fn remove_dependency_id(&mut self, _: DependencyId)
fn get_dependencies(&self) -> &[DependencyId]
Source§impl<__D: Fallible + ?Sized> Deserialize<RuntimeModuleFromJs, __D> for Archived<RuntimeModuleFromJs>where
String: Archive,
<String as Archive>::Archived: Deserialize<String, __D>,
Unsupported: ArchiveWith<Arc<dyn Fn() -> BoxFuture<'static, Result<String>> + Send + Sync>> + DeserializeWith<<Unsupported as ArchiveWith<Arc<dyn Fn() -> BoxFuture<'static, Result<String>> + Send + Sync>>>::Archived, Arc<dyn Fn() -> BoxFuture<'static, Result<String>> + Send + Sync>, __D>,
bool: Archive,
<bool as Archive>::Archived: Deserialize<bool, __D>,
RuntimeModuleStage: Archive,
<RuntimeModuleStage as Archive>::Archived: Deserialize<RuntimeModuleStage, __D>,
SourceMapKind: Archive,
<SourceMapKind as Archive>::Archived: Deserialize<SourceMapKind, __D>,
Option<String>: Archive,
<Option<String> as Archive>::Archived: Deserialize<Option<String>, __D>,
Skip: ArchiveWith<Arc<OnceCell<BoxSource>>> + DeserializeWith<<Skip as ArchiveWith<Arc<OnceCell<BoxSource>>>>::Archived, Arc<OnceCell<BoxSource>>, __D>,
impl<__D: Fallible + ?Sized> Deserialize<RuntimeModuleFromJs, __D> for Archived<RuntimeModuleFromJs>where
String: Archive,
<String as Archive>::Archived: Deserialize<String, __D>,
Unsupported: ArchiveWith<Arc<dyn Fn() -> BoxFuture<'static, Result<String>> + Send + Sync>> + DeserializeWith<<Unsupported as ArchiveWith<Arc<dyn Fn() -> BoxFuture<'static, Result<String>> + Send + Sync>>>::Archived, Arc<dyn Fn() -> BoxFuture<'static, Result<String>> + Send + Sync>, __D>,
bool: Archive,
<bool as Archive>::Archived: Deserialize<bool, __D>,
RuntimeModuleStage: Archive,
<RuntimeModuleStage as Archive>::Archived: Deserialize<RuntimeModuleStage, __D>,
SourceMapKind: Archive,
<SourceMapKind as Archive>::Archived: Deserialize<SourceMapKind, __D>,
Option<String>: Archive,
<Option<String> as Archive>::Archived: Deserialize<Option<String>, __D>,
Skip: ArchiveWith<Arc<OnceCell<BoxSource>>> + DeserializeWith<<Skip as ArchiveWith<Arc<OnceCell<BoxSource>>>>::Archived, Arc<OnceCell<BoxSource>>, __D>,
Source§fn deserialize(
&self,
deserializer: &mut __D,
) -> Result<RuntimeModuleFromJs, <__D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut __D, ) -> Result<RuntimeModuleFromJs, <__D as Fallible>::Error>
Deserializes using the given deserializer
Source§impl Diagnosable for RuntimeModuleFromJs
impl Diagnosable for RuntimeModuleFromJs
fn add_diagnostic(&mut self, _diagnostic: Diagnostic)
fn add_diagnostics(&mut self, _diagnostics: Vec<Diagnostic>)
fn diagnostics(&self) -> Cow<'_, [Diagnostic]>
fn first_error(&self) -> Option<Cow<'_, Diagnostic>>
Source§impl Identifiable for RuntimeModuleFromJs
impl Identifiable for RuntimeModuleFromJs
fn identifier(&self) -> Identifier
Source§impl Module for RuntimeModuleFromJs
impl Module for RuntimeModuleFromJs
Source§fn module_type(&self) -> &ModuleType
fn module_type(&self) -> &ModuleType
Defines what kind of module this is.
Source§fn source_types(&self, module_graph: &ModuleGraph<'_>) -> &[SourceType]
fn source_types(&self, module_graph: &ModuleGraph<'_>) -> &[SourceType]
Defines what kind of code generation results this module can generate.
Source§fn size(
&self,
_source_type: Option<&SourceType>,
compilation: Option<&Compilation>,
) -> f64
fn size( &self, _source_type: Option<&SourceType>, compilation: Option<&Compilation>, ) -> f64
The size of the original source, which will used as a parameter for code-splitting.
Only when calculating the size of the RuntimeModule is the Compilation depended on
Source§fn readable_identifier(&self, _context: &Context) -> Cow<'_, str>
fn readable_identifier(&self, _context: &Context) -> Cow<'_, str>
User readable identifier of the module.
Source§fn source(&self) -> Option<&BoxSource>
fn source(&self) -> Option<&BoxSource>
The source of the module. This could be optional, modules like the
NormalModule can have the corresponding source.
However, modules that is created from “nowhere” (e.g. ExternalModule and MissingModule) does not have its source.fn factory_meta(&self) -> Option<&FactoryMeta>
fn set_factory_meta(&mut self, v: FactoryMeta)
fn build_info(&self) -> &BuildInfo
fn build_info_mut(&mut self) -> &mut BuildInfo
fn build_meta(&self) -> &BuildMeta
fn build_meta_mut(&mut self) -> &mut BuildMeta
Source§fn code_generation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
compilation: &'life1 Compilation,
_runtime: Option<&'life2 RuntimeSpec>,
__arg3: Option<ConcatenationScope>,
) -> Pin<Box<dyn Future<Output = Result<CodeGenerationResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn code_generation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
compilation: &'life1 Compilation,
_runtime: Option<&'life2 RuntimeSpec>,
__arg3: Option<ConcatenationScope>,
) -> Pin<Box<dyn Future<Output = Result<CodeGenerationResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The actual code generation of the module, which will be called by the
Compilation.
The code generation result should not be cached as it is implemented elsewhere to
provide a universal cache mechanism (time to invalidate cache, etc.) Read moreSource§fn get_runtime_hash<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
compilation: &'life1 Compilation,
runtime: Option<&'life2 RuntimeSpec>,
) -> Pin<Box<dyn Future<Output = Result<RspackHashDigest>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_runtime_hash<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
compilation: &'life1 Compilation,
runtime: Option<&'life2 RuntimeSpec>,
) -> Pin<Box<dyn Future<Output = Result<RspackHashDigest>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Update hash for cgm.hash (chunk graph module hash)
Different cgm code generation result should have different cgm.hash,
so this also accept compilation (mainly chunk graph) and runtime as args.
(Difference with
impl Hash for Module: this is just a part for calculating cgm.hash, not for Module itself)Source§fn build<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_build_context: BuildContext,
_compilation: Option<&'life1 Compilation>,
) -> Pin<Box<dyn Future<Output = Result<BuildResult, Report>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn build<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_build_context: BuildContext,
_compilation: Option<&'life1 Compilation>,
) -> Pin<Box<dyn Future<Output = Result<BuildResult, Report>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
The actual build of the module, which will be called by the
Compilation.
Build can also returns the dependencies of the module, which will be used by the Compilation to build the dependency graph.fn get_exports_argument(&self) -> ExportsArgument
fn get_module_argument(&self) -> ModuleArgument
fn get_exports_type( &self, module_graph: &ModuleGraph<'_>, module_graph_cache: &Arc<ModuleGraphCacheArtifactInner>, strict: bool, ) -> ExportsType
fn get_strict_esm_module(&self) -> bool
Source§fn name_for_condition(&self) -> Option<Box<str>>
fn name_for_condition(&self) -> Option<Box<str>>
Name matched against bundle-splitting conditions.
fn lib_ident(&self, _options: LibIdentOptions<'_>) -> Option<Cow<'_, str>>
Source§fn get_code_generation_dependencies(
&self,
) -> Option<&[Box<dyn ModuleDependency>]>
fn get_code_generation_dependencies( &self, ) -> Option<&[Box<dyn ModuleDependency>]>
Code generation dependencies of the module, which means the code generation of this module
depends on the code generation results of dependencies which are returned by this function.
e.g
Css module may rely on the code generation result of CssUrlDependency to re-direct
the url of the referenced assets.fn get_presentational_dependencies( &self, ) -> Option<&[Box<dyn DependencyCodeGeneration>]>
fn get_concatenation_bailout_reason( &self, _mg: &ModuleGraph<'_>, _cg: &ChunkGraph, ) -> Option<Cow<'static, str>>
Source§fn get_resolve_options(&self) -> Option<Arc<Resolve>>
fn get_resolve_options(&self) -> Option<Arc<Resolve>>
Resolve options matched by module rules.
e.g
javascript/esm may have special resolving options like fullySpecified.
css and css/module may have special resolving options like preferRelative.fn get_context(&self) -> Option<Box<Context>>
fn get_layer(&self) -> Option<&String>
fn chunk_condition( &self, _chunk_key: &ChunkUkey, _compilation: &Compilation, ) -> Option<bool>
fn get_side_effects_connection_state( &self, _module_graph: &ModuleGraph<'_>, _module_graph_cache: &Arc<ModuleGraphCacheArtifactInner>, _module_chain: &mut HashSet<Identifier, BuildHasherDefault<IdentityHasher>>, _connection_state_cache: &mut HashMap<Identifier, ConnectionState, BuildHasherDefault<IdentityHasher>>, ) -> ConnectionState
fn need_build(&self, value_cache_version: &ValueCacheVersions) -> bool
fn depends_on(&self, modified_file: &HashSet<ArcPath, FxBuildHasher>) -> bool
fn need_id(&self) -> bool
Source§impl ModuleSourceMapConfig for RuntimeModuleFromJs
impl ModuleSourceMapConfig for RuntimeModuleFromJs
fn get_source_map_kind(&self) -> &SourceMapKind
fn set_source_map_kind(&mut self, source_map_kind: SourceMapKind)
Source§impl RuntimeModule for RuntimeModuleFromJs
impl RuntimeModule for RuntimeModuleFromJs
fn name(&self) -> Identifier
fn generate<'life0, 'life1, 'async_trait>(
&'life0 self,
_: &'life1 Compilation,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn full_hash(&self) -> bool
fn dependent_hash(&self) -> bool
fn should_isolate(&self) -> bool
fn stage(&self) -> RuntimeModuleStage
fn attach(&mut self, _chunk: ChunkUkey)
fn template(&self) -> Vec<(String, String)>
fn generate_with_custom<'life0, 'life1, 'async_trait>(
&'life0 self,
compilation: &'life1 Compilation,
) -> Pin<Box<dyn Future<Output = Result<String, Report>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
Source§impl<__S: Fallible + ?Sized> Serialize<__S> for RuntimeModuleFromJswhere
String: Serialize<__S>,
Unsupported: SerializeWith<Arc<dyn Fn() -> BoxFuture<'static, Result<String>> + Send + Sync>, __S>,
bool: Serialize<__S>,
RuntimeModuleStage: Serialize<__S>,
SourceMapKind: Serialize<__S>,
Option<String>: Serialize<__S>,
Skip: SerializeWith<Arc<OnceCell<BoxSource>>, __S>,
impl<__S: Fallible + ?Sized> Serialize<__S> for RuntimeModuleFromJswhere
String: Serialize<__S>,
Unsupported: SerializeWith<Arc<dyn Fn() -> BoxFuture<'static, Result<String>> + Send + Sync>, __S>,
bool: Serialize<__S>,
RuntimeModuleStage: Serialize<__S>,
SourceMapKind: Serialize<__S>,
Option<String>: Serialize<__S>,
Skip: SerializeWith<Arc<OnceCell<BoxSource>>, __S>,
Auto Trait Implementations§
impl Freeze for RuntimeModuleFromJs
impl !RefUnwindSafe for RuntimeModuleFromJs
impl Send for RuntimeModuleFromJs
impl Sync for RuntimeModuleFromJs
impl Unpin for RuntimeModuleFromJs
impl !UnwindSafe for RuntimeModuleFromJs
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> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
The archived counterpart of this type. Unlike
Archive, it may be
unsized. Read moreSource§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
Creates the archived version of the metadata for this value.
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> 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> 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> RuntimeModuleExt for Twhere
T: RuntimeModule + 'static,
impl<T> RuntimeModuleExt for Twhere
T: RuntimeModule + 'static,
fn boxed(self) -> Box<dyn RuntimeModule>
Source§impl<T> SerializeDyn for Twhere
T: for<'a> SerializeUnsized<Strategy<Serializer<AlignedVec, ArenaHandle<'a>, Share>, SerializeError>>,
impl<T> SerializeDyn for Twhere
T: for<'a> SerializeUnsized<Strategy<Serializer<AlignedVec, ArenaHandle<'a>, Share>, SerializeError>>,
Source§fn serialize_dyn(
&self,
serializer: &mut Strategy<Serializer<AlignedVec, ArenaHandle<'_>, Share>, SerializeError>,
) -> Result<usize, SerializeError>
fn serialize_dyn( &self, serializer: &mut Strategy<Serializer<AlignedVec, ArenaHandle<'_>, Share>, SerializeError>, ) -> Result<usize, SerializeError>
Writes the value to the serializer and returns the position it was written to.
Source§impl<T, S> SerializeUnsized<S> for T
impl<T, S> SerializeUnsized<S> 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.