Trait ValueTypeMarker
pub trait ValueTypeMarker: TypeMarker {
type Borrowed<'a>;
// Required method
fn borrow(value: &Self::Owned) -> Self::Borrowed<'_>;
}
Expand description
A FIDL value type marker.
Value types are guaranteed to never contain handles. As a result, they can
be encoded by immutable reference (or by value for Copy
types).
Required Associated Types§
type Borrowed<'a>
type Borrowed<'a>
The Rust type to use for encoding. This is a particular Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases:
- Special cases such as
&[T]
for vectors. - For primitives, bits, and enums, it is
Owned
. - Otherwise, it is
&Owned
.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.