Skip to main content

NoDefaultOptions

Trait NoDefaultOptions 

Source
pub trait NoDefaultOptions {
    type Options;

    // Required method
    fn resolve(self) -> Option<Self::Options>;
}
Available on crate feature runtime only.
Expand description

The arm taken where O: Default does NOT hold — one autoref away from BareOptions::resolve, which is what makes it the fallback rather than an ambiguity.

Nothing implements this by hand and nothing should: it exists to be the second candidate in one method lookup, and its blanket impl over &BareOptions<O> is the whole of it.

Required Associated Types§

Source

type Options

The options type probed for.

Required Methods§

Source

fn resolve(self) -> Option<Self::Options>

None — the type has no Default, so a bare section has nothing to run at.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§