pub trait ProxyT {
// Required methods
fn type_() -> ObjectType
where Self: Sized;
fn upcast(self) -> Proxy;
fn upcast_ref(&self) -> &Proxy;
unsafe fn from_proxy_unchecked(proxy: Proxy) -> Self
where Self: Sized;
}
Required Methods§
fn type_() -> ObjectTypewhere
Self: Sized,
fn upcast(self) -> Proxy
fn upcast_ref(&self) -> &Proxy
sourceunsafe fn from_proxy_unchecked(proxy: Proxy) -> Selfwhere
Self: Sized,
unsafe fn from_proxy_unchecked(proxy: Proxy) -> Selfwhere
Self: Sized,
Downcast the provided proxy to Self
without checking that the type matches.
This function should not be used by applications. If you really do need a way to downcast a proxy to it’s type, please open an issue.
§Safety
It must be manually ensured that the provided proxy is actually a proxy representing the created type.
Otherwise, undefined behaviour may occur.