pub fn lease_with(&self, kind: Option<&'static str>, name: Cow<'static, str>) -> Lease {
        let mut leases = self.leases.lock();
        let entry = leases.vacant_entry();
        let lease = Lease {
            key: NonZeroUsize::new(entry.key() + 1).unwrap(),
            tracker: self.clone(),
        };
        entry.insert(OpenLease { kind, name });
        lease
    }
/// Register a lease using a custom name string rather than generating it from caller
/// information.
Register a lease using a custom name string rather than generating it from caller
information.
Register a lease using a custom name string rather than generating it from caller information .
pub fn lease_with(&self, kind: Option<&'static str>, name: Cow<'static, str>) -> Lease {
        let mut leases = self.leases.lock();
        let entry = leases.vacant_entry();
        let lease = Lease {
            key: NonZeroUsize::new(entry.key() + 1).unwrap(),
            tracker: self.clone(),
        };
        entry.insert(OpenLease { kind, name });
        lease
    }
pub fn lease_with ( & self , kind : Option < & ' static str > , name : Cow < ' static , str > ) -> Lease { let mut leases = self . leases . lock ( ) ; let entry = leases . vacant_entry ( ) ; let lease = Lease { key : NonZeroUsize :: new ( entry . key ( ) + 1 ) . unwrap ( ) , tracker : self . clone ( ) , } ; entry . insert ( OpenLease { kind , name } ) ; lease }
Register a lease using a custom name string rather than generating it from caller
information.
Register a lease using a custom name string rather than generating it from caller information .
&self
kind
Option<&'static str>
name
Cow<'static, str>
&self
kind
Option<&'static str>
name
Cow<'static, str>