pub unsafe trait Output<T>: Sized + OutputSealed<T> {
// Required method
fn write(self, item: T);
}
Expand description
§Safety
By using this trait, implementors of functions are promising to call
write
, so that when the function returns, there is a
value written to the output. For example, users can pass a reference to
MaybeUninit
and rely on the fact that it got
initialised to safely call assume_init
.
idk how to enforce the above properly using unsafe etc.
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.