pub trait OpaqueResource:
Send
+ Sync
+ 'static {
type Marker: 'static;
}Expand description
A value that can be registered in a session’s opaque-object table.
Marker is the public protocol-level type carried by Gift and Cite;
it is nothing but a name, so that the concrete resource type may remain
private.
The mapping from marker to resource must be injective, and
Session::register panics if an application ever registers two concrete
types under one marker — otherwise a marker would not identify a type and
the wire could not be typechecked at all.
Required Associated Types§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".