diff --git a/src/registry.rs b/src/registry.rs index 53fb4785e..24aed3ecb 100644 --- a/src/registry.rs +++ b/src/registry.rs @@ -402,6 +402,13 @@ impl SimpleGlobal { pub fn with_min_version(&self, min_version: u32) -> Result<&I, GlobalError> { self.proxy.with_min_version(min_version) } + + /// Construct an instance from an already bound proxy. + /// + /// Useful when a [`ProvidesBoundGlobal`] implementation is needed. + pub fn from_bound(proxy: I) -> Self { + Self { proxy: GlobalProxy::Bound(proxy) } + } } impl ProvidesBoundGlobal