Skip to main content

FallbackWarningSink

Trait FallbackWarningSink 

Source
pub trait FallbackWarningSink:
    Send
    + Sync
    + Debug {
    // Required method
    fn warn(&self, value: &RawStr) -> Result<(), ChargeError>;

    // Provided methods
    fn warn_value(&self, value: &RawStr) -> Result<RawStr, ChargeError> { ... }
    fn warn_value_at(
        &self,
        value: &RawStr,
        _bundle: bool,
    ) -> Result<RawStr, ChargeError> { ... }
}
Expand description

Warning delivery for version resolution. A Python binding installs its warning emitter here; native callers can collect or display the same warning.

Required Methods§

Source

fn warn(&self, value: &RawStr) -> Result<(), ChargeError>

Emit the configured fallback’s warning, respecting the sink’s filter.

Provided Methods§

Source

fn warn_value(&self, value: &RawStr) -> Result<RawStr, ChargeError>

Python rereads its mutable setting after the warning handler returns. Native emitters preserve the original value; bindings may return the value a reentrant warning handler installed instead.

Source

fn warn_value_at( &self, value: &RawStr, _bundle: bool, ) -> Result<RawStr, ChargeError>

Bindings keep separate warning registries for BundleFile and SerializedFile, where UnityPy resolves their fallback versions.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§