Skip to main content

EventKind

Enum EventKind 

Source
pub enum EventKind {
Show 57 variants WorkflowStarted { task_count: usize, generation_id: String, workflow_hash: String, nika_version: String, }, WorkflowCompleted { final_output: Arc<Value>, total_duration_ms: u64, }, WorkflowFailed { error: String, failed_task: Option<Arc<str>>, }, WorkflowAborted { reason: String, duration_ms: u64, running_tasks: Vec<Arc<str>>, }, WorkflowPaused, WorkflowResumed, TaskScheduled { task_id: Arc<str>, dependencies: Vec<Arc<str>>, }, TaskStarted { task_id: Arc<str>, verb: Arc<str>, inputs: Value, }, TaskCompleted { task_id: Arc<str>, output: Arc<Value>, duration_ms: u64, }, TaskFailed { task_id: Arc<str>, error: String, duration_ms: u64, error_code: Option<String>, }, TaskSkipped { task_id: Arc<str>, reason: String, }, TemplateResolved { task_id: Arc<str>, template: String, result: String, }, ProviderCalled { task_id: Arc<str>, provider: String, model: String, prompt_len: usize, }, ProviderResponded { task_id: Arc<str>, request_id: Option<String>, input_tokens: u64, output_tokens: u64, cache_read_tokens: u64, ttft_ms: Option<u64>, finish_reason: String, cost_usd: f64, }, ContextAssembled { task_id: Arc<str>, sources: Vec<ContextSource>, excluded: Vec<ExcludedItem>, total_tokens: u64, budget_used_pct: f32, truncated: bool, }, McpInvoke { task_id: Arc<str>, call_id: String, mcp_server: String, tool: Option<String>, resource: Option<String>, params: Option<Value>, }, McpResponse { task_id: Arc<str>, call_id: String, output_len: usize, duration_ms: u64, cached: bool, is_error: bool, response: Option<Value>, }, McpConnected { server_name: String, }, McpError { server_name: String, error: String, }, McpRetry { task_id: Arc<str>, server_name: String, operation: String, attempt: u32, max_attempts: u32, error: String, }, AgentStart { task_id: Arc<str>, max_turns: u32, mcp_servers: Vec<String>, }, AgentTurn { task_id: Arc<str>, turn_index: u32, kind: String, metadata: Option<AgentTurnMetadata>, }, AgentComplete { task_id: Arc<str>, turns: u32, stop_reason: String, }, AgentSpawned { parent_task_id: Arc<str>, child_task_id: Arc<str>, depth: u32, }, GuardrailPassed { task_id: Arc<str>, guardrail_type: String, description: String, }, GuardrailFailed { task_id: Arc<str>, guardrail_type: String, description: String, message: String, }, GuardrailEscalation { task_id: Arc<str>, guardrail_type: String, guardrail_id: String, message: String, severity: String, suggested_action: Option<String>, }, Log { level: String, message: String, task_id: Option<Arc<str>>, }, Custom { name: String, payload: Value, task_id: Option<Arc<str>>, }, ArtifactWritten { task_id: Arc<str>, path: String, size: u64, format: String, checksum: Option<String>, }, ArtifactFailed { task_id: Arc<str>, path: String, reason: String, }, MediaExtracted { task_id: Arc<str>, block_count: u32, content_types: Vec<String>, }, MediaProcessed { task_id: Arc<str>, hash: String, mime_type: String, size_bytes: u64, }, MediaStored { task_id: Arc<str>, hash: String, path: String, size_bytes: u64, verified: bool, deduplicated: bool, pipeline_ms: u64, }, MediaStoreFailed { task_id: Arc<str>, hash: String, reason: String, }, MediaIntegrityCheck { checked: u64, warnings: u64, }, StructuredOutputAttempt { task_id: Arc<str>, layer: u8, layer_name: String, attempt: u32, success: bool, error: Option<String>, }, StructuredOutputSuccess { task_id: Arc<str>, layer: u8, layer_name: String, total_attempts: u32, }, VisionContentResolved { task_id: Arc<str>, image_count: u32, total_bytes: u64, resolve_ms: u64, }, HttpRequest { task_id: Arc<str>, method: String, url: String, has_body: bool, }, HttpResponse { task_id: Arc<str>, status_code: u16, content_type: Option<String>, content_length: Option<u64>, elapsed_ms: u64, }, MediaCleanup { removed: u64, bytes_freed: u64, dry_run: bool, }, ExecCompleted { task_id: Arc<str>, exit_code: i32, stdout_len: usize, stderr_len: usize, duration_ms: u64, }, FetchRetry { task_id: Arc<str>, url: String, attempt: u32, max_attempts: u32, status_code: Option<u16>, backoff_ms: u64, }, PolicyBlocked { task_id: Arc<str>, verb: String, policy_type: String, reason: String, }, BootPhaseCompleted { phase: String, success: bool, duration_ms: u64, warnings: Vec<String>, }, NativeModelLoaded { model: String, kind: String, size_bytes: u64, duration_ms: u64, is_vision: bool, }, BindingDefaultApplied { task_id: Arc<str>, alias: String, path: String, default_value: Value, }, BindingTransformApplied { task_id: Arc<str>, alias: String, transform_chain: String, }, BindingEnvResolved { task_id: Arc<str>, var_name: String, found: bool, }, DecomposeStarted { task_id: Arc<str>, strategy: String, }, DecomposeCompleted { task_id: Arc<str>, strategy: String, item_count: usize, duration_ms: u64, }, ForEachStarted { task_id: Arc<str>, item_count: usize, concurrency: usize, fail_fast: bool, }, ForEachCompleted { task_id: Arc<str>, total: u32, succeeded: u32, failed: u32, skipped: u32, duration_ms: u64, }, ProviderInitialized { provider: String, model: String, cached: bool, }, BuiltinToolInvoked { task_id: Arc<str>, tool_name: String, duration_ms: u64, success: bool, }, ExtractApplied { task_id: Arc<str>, mode: String, selector: Option<String>, input_len: usize, output_len: usize, },
}
Expand description

All possible event types (3 levels)

Uses Arc<str> for task_id fields to enable zero-cost cloning.

Variants§

§

WorkflowStarted

Fields

§task_count: usize
§generation_id: String

Unique generation ID for this execution

§workflow_hash: String

Hash of workflow file for cache invalidation

§nika_version: String

Nika version

§

WorkflowCompleted

Fields

§final_output: Arc<Value>
§total_duration_ms: u64
§

WorkflowFailed

Fields

§error: String
§failed_task: Option<Arc<str>>
§

WorkflowAborted

Workflow was cancelled by user

Fields

§reason: String

Reason for abort (e.g., “User cancelled”, “Timeout”)

§duration_ms: u64

Duration before abort (ms)

§running_tasks: Vec<Arc<str>>

Tasks that were still running when aborted

§

WorkflowPaused

Workflow execution paused

§

WorkflowResumed

Workflow execution resumed

§

TaskScheduled

Fields

§task_id: Arc<str>
§dependencies: Vec<Arc<str>>
§

TaskStarted

Task execution begins with resolved inputs from with: block

Fields

§task_id: Arc<str>
§verb: Arc<str>

Verb type (infer, exec, fetch, invoke, agent)

§inputs: Value

Resolved inputs from ResolvedBindings (what the task receives)

§

TaskCompleted

Fields

§task_id: Arc<str>
§output: Arc<Value>
§duration_ms: u64
§

TaskFailed

Fields

§task_id: Arc<str>
§error: String
§duration_ms: u64
§error_code: Option<String>

Structured error code (e.g. “NIKA-044”) for programmatic extraction

§

TaskSkipped

A task was skipped because a dependency failed.

Fields

§task_id: Arc<str>
§reason: String

The dependency that failed causing the skip

§

TemplateResolved

Fields

§task_id: Arc<str>
§template: String
§result: String
§

ProviderCalled

Fields

§task_id: Arc<str>
§provider: String
§model: String
§prompt_len: usize
§

ProviderResponded

Fields

§task_id: Arc<str>
§request_id: Option<String>

API request ID (for debugging with provider)

§input_tokens: u64

Input tokens

§output_tokens: u64

Output tokens

§cache_read_tokens: u64

Cache read tokens (if any)

§ttft_ms: Option<u64>

Time to first token (ms), if known

§finish_reason: String

Finish reason

§cost_usd: f64

Estimated cost in USD

§

ContextAssembled

Context assembly event for observability

Fields

§task_id: Arc<str>
§sources: Vec<ContextSource>

Sources included in context

§excluded: Vec<ExcludedItem>

Items excluded (with reasons)

§total_tokens: u64

Total tokens in assembled context

§budget_used_pct: f32

Budget utilization percentage

§truncated: bool

Was context truncated?

§

McpInvoke

MCP tool call or resource read initiated

Fields

§task_id: Arc<str>
§call_id: String

Unique call ID for correlating with McpResponse

§mcp_server: String
§resource: Option<String>
§params: Option<Value>

Full params passed to MCP tool (for TUI display)

§

McpResponse

MCP operation completed

Fields

§task_id: Arc<str>
§call_id: String

Correlates with McpInvoke.call_id

§output_len: usize
§duration_ms: u64

Duration of MCP call in milliseconds

§cached: bool

Whether response came from cache

§is_error: bool

Whether MCP tool returned an error

§response: Option<Value>

Full response JSON (for TUI display)

§

McpConnected

MCP server connection established

Fields

§server_name: String

Name of the connected MCP server

§

McpError

MCP server connection failed

Fields

§server_name: String

Name of the MCP server

§error: String

Error description

§

McpRetry

MCP operation retry attempt

Emitted when MCP tool calls fail with connection errors and are retried. Use McpClient::call_tool_with_retry_events() for observable retry tracking. TUI handlers display this event with attempt count and error details.

Fields

§task_id: Arc<str>

Task ID initiating the retry

§server_name: String

Name of the MCP server

§operation: String

Tool or resource being retried

§attempt: u32

Current attempt number (1-based)

§max_attempts: u32

Max attempts configured

§error: String

Error that triggered the retry

§

AgentStart

Agent loop started

Fields

§task_id: Arc<str>
§max_turns: u32
§mcp_servers: Vec<String>
§

AgentTurn

Agent turn event with optional metadata

When metadata is present, it contains:

  • Response text
  • Token usage (input/output/cache)
  • Stop reason
  • Thinking content (if using streaming API)

Fields

§task_id: Arc<str>
§turn_index: u32
§kind: String

Event kind: “started”, “continue”, “natural_completion”, “explicit_completion”

§metadata: Option<AgentTurnMetadata>

Turn metadata including response text, tokens, thinking

§

AgentComplete

Agent loop completed (reached stop condition or max turns)

Fields

§task_id: Arc<str>
§turns: u32
§stop_reason: String
§

AgentSpawned

A sub-agent was spawned by a parent agent

Fields

§parent_task_id: Arc<str>

ID of the parent task that spawned the child

§child_task_id: Arc<str>

ID of the newly spawned child task

§depth: u32

Current depth level (1 = root agent spawning first child)

§

GuardrailPassed

Guardrail check passed

Fields

§task_id: Arc<str>

Task ID for correlation

§guardrail_type: String

Guardrail type: “length”, “schema”, “regex”

§description: String

Human-readable description of the guardrail

§

GuardrailFailed

Guardrail check failed

Fields

§task_id: Arc<str>

Task ID for correlation

§guardrail_type: String

Guardrail type: “length”, “schema”, “regex”, “llm”

§description: String

Human-readable description of the guardrail

§message: String

Error message explaining why it failed

§

GuardrailEscalation

Guardrail failure requires escalation

Emitted when a guardrail with on_failure: escalate fails. This signals that human intervention or special handling is needed.

Fields

§task_id: Arc<str>

Task ID for correlation

§guardrail_type: String

Guardrail type: “length”, “schema”, “regex”, “llm”

§guardrail_id: String

Guardrail ID for identification

§message: String

Error message explaining why it failed

§severity: String

Severity level: “low”, “medium”, “high”, “critical”

§suggested_action: Option<String>

Suggested action (optional)

§

Log

Log event emitted by nika:log builtin tool

Fields

§level: String

Log level: trace, debug, info, warn, error

§message: String

Log message

§task_id: Option<Arc<str>>

Optional task context

§

Custom

Custom event emitted by nika:emit builtin tool

Fields

§name: String

Event name/type

§payload: Value

Event payload (arbitrary JSON)

§task_id: Option<Arc<str>>

Optional task context

§

ArtifactWritten

Artifact successfully written to disk

Fields

§task_id: Arc<str>

Task that produced this artifact

§path: String

Final resolved path

§size: u64

Size in bytes

§format: String

Output format (text, json, binary)

§checksum: Option<String>

Blake3 checksum from CAS (binary artifacts only)

§

ArtifactFailed

Artifact write failed

Fields

§task_id: Arc<str>

Task that produced this artifact

§path: String

Intended path

§reason: String

Error reason

§

MediaExtracted

Media content blocks extracted from MCP tool result

Fields

§task_id: Arc<str>
§block_count: u32

Number of non-text content blocks found

§content_types: Vec<String>

Content types found (e.g., [“image”, “audio”])

§

MediaProcessed

Single media block processed (decoded + detected)

Fields

§task_id: Arc<str>
§hash: String

blake3 hash of the decoded content (with “blake3:” prefix)

§mime_type: String

Detected MIME type

§size_bytes: u64

File size in bytes (decoded)

§

MediaStored

Media file stored in CAS

Fields

§task_id: Arc<str>
§hash: String

blake3 hash (with “blake3:” prefix)

§path: String

File path in CAS store

§size_bytes: u64

File size in bytes

§verified: bool

Whether read-back verification passed (or skipped for small files)

§deduplicated: bool

Whether this was a dedup hit

§pipeline_ms: u64

Pipeline latency in milliseconds (decode -> store)

§

MediaStoreFailed

Media storage failed

Fields

§task_id: Arc<str>
§hash: String

blake3 hash (if available, empty string if pre-hash failure)

§reason: String

Error description

§

MediaIntegrityCheck

Media integrity check completed (emitted after all tasks finish)

Fields

§checked: u64

Number of media refs checked

§warnings: u64

Number of integrity warnings (missing files, size mismatches)

§

StructuredOutputAttempt

Structured output extraction attempt at a specific layer

Emitted for each layer/retry attempt in the 4-layer defense system:

  • Layer 1: rig Extractor (Rust types with JsonSchema)
  • Layer 2: Extract + Validate (post-processing)
  • Layer 3: Retry with Feedback
  • Layer 4: LLM Repair

Fields

§task_id: Arc<str>

Task ID for correlation

§layer: u8

Layer number (0-4)

§layer_name: String

Human-readable layer name (e.g., “tool_injection”, “extract_validate”)

§attempt: u32

Attempt number within this layer (1-based)

§success: bool

Whether this attempt succeeded

§error: Option<String>

Error message if failed

§

StructuredOutputSuccess

Structured output successfully extracted

Emitted when any layer successfully produces valid output

Fields

§task_id: Arc<str>

Task ID for correlation

§layer: u8

Layer that succeeded (1-4)

§layer_name: String

Human-readable layer name

§total_attempts: u32

Total attempts across all layers before success

§

VisionContentResolved

Vision content parts resolved for multimodal inference.

Emitted when CAS image references in content: are resolved to base64 data before sending to a vision-capable LLM.

Fields

§task_id: Arc<str>

Task that triggered vision resolution

§image_count: u32

Number of image parts resolved

§total_bytes: u64

Total bytes of image data resolved from CAS

§resolve_ms: u64

Time to resolve all images (ms)

§

HttpRequest

HTTP request initiated by fetch: verb

Fields

§task_id: Arc<str>
§method: String
§has_body: bool
§

HttpResponse

HTTP response received by fetch: verb

Fields

§task_id: Arc<str>
§status_code: u16
§content_type: Option<String>
§content_length: Option<u64>
§elapsed_ms: u64
§

MediaCleanup

Media store cleanup (GC) operation completed

Fields

§removed: u64

Number of files removed

§bytes_freed: u64

Total bytes freed

§dry_run: bool

Whether this was a dry-run (no files actually deleted)

§

ExecCompleted

Shell command execution completed with exit details

Fields

§task_id: Arc<str>
§exit_code: i32

Process exit code (0 = success)

§stdout_len: usize

Length of stdout in bytes

§stderr_len: usize

Length of stderr in bytes

§duration_ms: u64

Execution duration in milliseconds

§

FetchRetry

Fetch retry attempt (mirrors McpRetry pattern)

Fields

§task_id: Arc<str>
§url: String

URL being fetched

§attempt: u32

Current attempt number (1-based)

§max_attempts: u32

Max attempts configured

§status_code: Option<u16>

HTTP status code that triggered retry (if any)

§backoff_ms: u64

Backoff delay before this attempt in ms

§

PolicyBlocked

Security policy blocked an operation

Fields

§task_id: Arc<str>
§verb: String

Verb that was blocked (exec, fetch, invoke)

§policy_type: String

Policy type that triggered block (command_blocklist, host_blocklist, ssrf, etc.)

§reason: String

Human-readable reason for the block

§

BootPhaseCompleted

Boot phase completed (one per phase during startup)

Fields

§phase: String

Phase name: “config_discovery”, “config_validation”, “memory_loading”, “secrets_loading”, “mcp_startup”, “provider_validation”, “ready”

§success: bool

Whether the phase succeeded

§duration_ms: u64

Phase duration in milliseconds

§warnings: Vec<String>

Warnings produced during this phase

§

NativeModelLoaded

Native (local) model loaded successfully

Fields

§model: String

Model identifier (file path for GGUF, HF ID for HuggingFace)

§kind: String

Model kind: “gguf” or “huggingface”

§size_bytes: u64

Model file size in bytes (0 for HuggingFace downloads)

§duration_ms: u64

Load duration in milliseconds

§is_vision: bool

Whether model has vision capabilities

§

BindingDefaultApplied

Binding default value applied (via ?? operator)

Fields

§task_id: Arc<str>
§alias: String

Alias name in with: block

§path: String

Original binding path that was null/missing

§default_value: Value

Default value that was used

§

BindingTransformApplied

Binding transform chain applied (e.g., |upper|trim|sort)

Fields

§task_id: Arc<str>
§alias: String

Alias name

§transform_chain: String

Transform expression (e.g., “upper | trim”)

§

BindingEnvResolved

Environment variable resolved via $env.VAR_NAME binding

Fields

§task_id: Arc<str>
§var_name: String

Environment variable name

§found: bool

Whether the env var was found

§

DecomposeStarted

Decompose modifier expansion started

Fields

§task_id: Arc<str>
§strategy: String

Strategy: “semantic”, “static”, “nested”

§

DecomposeCompleted

Decompose modifier expansion completed

Fields

§task_id: Arc<str>
§strategy: String

Strategy used

§item_count: usize

Number of items produced

§duration_ms: u64

Expansion duration in milliseconds

§

ForEachStarted

for_each iteration batch started

Fields

§task_id: Arc<str>
§item_count: usize

Number of items to iterate over

§concurrency: usize

Concurrency level (1 = sequential)

§fail_fast: bool

Whether fail_fast is enabled

§

ForEachCompleted

for_each iteration batch completed with aggregated results

Fields

§task_id: Arc<str>
§total: u32

Total iterations attempted

§succeeded: u32

Successful iterations

§failed: u32

Failed iterations (errors)

§skipped: u32

Skipped iterations (cancelled by fail_fast)

§duration_ms: u64

Total duration across all iterations (ms)

§

ProviderInitialized

Provider initialized (first use, cache miss)

Fields

§provider: String

Provider name (anthropic, openai, mistral, etc.)

§model: String

Default model for this provider

§cached: bool

Whether this was served from cache

§

BuiltinToolInvoked

Builtin tool invoked by agent (nika:read, nika:write, etc.)

Fields

§task_id: Arc<str>
§tool_name: String

Tool name: “nika:read”, “nika:write”, etc.

§duration_ms: u64

Call duration in milliseconds

§success: bool

Whether the call succeeded

§

ExtractApplied

Extraction mode applied to fetch response

Fields

§task_id: Arc<str>
§mode: String

Extract mode: “css”, “jq”, “text”, “markdown”, “llm_txt”

§selector: Option<String>

CSS/jq selector used (if any)

§input_len: usize

Input body length (bytes)

§output_len: usize

Output length after extraction (bytes)

Implementations§

Source§

impl EventKind

Source

pub fn task_id(&self) -> Option<&str>

Extract task_id if event is task-related

Source

pub fn is_workflow_event(&self) -> bool

Check if this is a workflow-level event

Trait Implementations§

Source§

impl Clone for EventKind

Source§

fn clone(&self) -> EventKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for EventKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for EventKind

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<EventKind, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for EventKind

Source§

fn eq(&self, other: &EventKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for EventKind

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for EventKind

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

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

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> FmtForward for T

Source§

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,

Causes self to use its Display implementation when Debug-formatted.
Source§

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,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

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,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

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,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T> Instrument for T

Source§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<D> OwoColorize for D

Source§

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,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

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

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

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>

Set the background color to a specific RGB value.
Source§

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>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

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

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where 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) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

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
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

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
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

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

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

Source§

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

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

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

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

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

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

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
where Self: Borrow<B>, B: ?Sized,

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
where Self: BorrowMut<B>, B: ?Sized,

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
where Self: AsRef<R>, R: ?Sized,

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
where Self: AsMut<R>, R: ?Sized,

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
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

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

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

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> WithSubscriber for T

Source§

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

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<T> WasmCompatSend for T
where T: Send,

Source§

impl<T> WasmCompatSync for T
where T: Sync,