pub fn resolve<T>(&self) -> T
    where
        T: 'static,
    {
        self.try_resolve::<T>().unwrap_or_else(|| {
            panic!(
                "Wonderbox failed to resolve the type `{}`.\nHelp: {}",
                type_name::<T>(),
                self.resolution_failure_help()
            )
        })
    }
/// Retrieves the registered implementation of the specified type.
/// # Errors
/// Panics with a nice error message if the type was not registered
/// # Examples
/// Resolve a simple registered type
/// ```
/// use wonderbox::Container;
///
/// let mut container = Container::new();
/// container.register(|_| "some dependency".to_string());
///
/// let resolved = container.try_resolve::<String>();
/// assert!(resolved.is_some())
/// ```
///
/// Resolve a trait object
/// ```
/// use wonderbox::Container;
///
/// let mut container = Container::new();
///
/// container.register(|_| "foo".to_string());
/// container.register(|container| {
///     let dependency = container.try_resolve::<String>().unwrap();
///     let foo = FooImpl {
///         stored_string: dependency,
///     };
///     Box::new(foo) as Box<dyn Foo>
/// });
///
/// let resolved = container.resolve::<Box<dyn Foo>>();
///
/// trait Foo {}
/// struct FooImpl {
///     stored_string: String,
/// }
/// impl Foo for FooImpl {}
/// ```
Retrieves the registered implementation of the specified type.
Retrieves the registered implementation of the specified type .
pub fn resolve<T>(&self) -> T
    where
        T: 'static,
    {
        self.try_resolve::<T>().unwrap_or_else(|| {
            panic!(
                "Wonderbox failed to resolve the type `{}`.\nHelp: {}",
                type_name::<T>(),
                self.resolution_failure_help()
            )
        })
    }
pub fn resolve < T > ( & self ) -> T where T : ' static , { self . try_resolve :: < T > ( ) . unwrap_or_else ( | | { panic ! ( " \n " type_name T ( ) self resolution_failure_help ( ) ) } ) }
Retrieves the registered implementation of the specified type.
Retrieves the registered implementation of the specified type .
&self
&self
errors
Panics with a nice error message if the type was not registered
Panics with a nice error message if the type was not registered
examples
Resolve a simple registered type
```
use wonderbox::Container.

let mut container = Container::new();
container.register(|_| "some dependency".to_string()).

let resolved = container.try_resolve::();
assert!(resolved.is_some())
```

Resolve a trait object
```
use wonderbox::Container.

let mut container = Container::new().

container.register(|_| "foo".to_string());
container.register(|container| {
let dependency = container.try_resolve::().unwrap();
let foo = FooImpl {
stored_string: dependency,
};
Box::new(foo) as Box
}).

let resolved = container.resolve::>().

trait Foo {}
struct FooImpl {
stored_string: String,
}
impl Foo for FooImpl {}
```
Resolve a simple registered type ` ` ` use wonderbox :: Container . let mut container = Container :: new () ; container . register ( |_| " some dependency " . to_string () ) . let resolved = container . try_resolve :: () ; assert! ( resolved . is_some () ) ` ` ` Resolve a trait object ` ` ` use wonderbox :: Container . let mut container = Container :: new () . container . register ( |_| " foo " . to_string () ) ; container . register ( |container| { let dependency = container . try_resolve :: () . unwrap () ; let foo = FooImpl { stored_string : dependency } ; Box :: new ( foo ) as Box } ) . let resolved = container . resolve :: > () . trait Foo {} struct FooImpl { stored_string : String } impl Foo for FooImpl {} ` ` `