pub fn existing_with_key_as_self<TKey, TSvc: Any>(
    instance: TSvc
) -> ServiceDescriptor
Available on crate feature builder only.
Expand description

Creates a new singleton ServiceDescriptor for an existing service instance with a key.

Arguments

  • instance - The existing service instance

Remarks

This function maps an existing instance to itself rather than a trait.