existing_with_key

Function existing_with_key 

Source
pub fn existing_with_key<TKey, TSvc: Any + ?Sized, TImpl>(
    instance: Box<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 a trait.