Skip to main content

ReadOwned

Trait ReadOwned 

Source
pub trait ReadOwned: Default + for<'de> Read<'de> { }
Expand description

Convenience bound for a function that parses a T out of a document it owns: readable from any BEVE input, and constructible.

The BEVE counterpart of json::ReadOwned, which carries the full account of why the bound is higher-ranked and why Default is part of it.

Prefer crate::ReadOwned, which also covers JSON, unless the type is deliberately BEVE only.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> ReadOwned for T
where T: Default + for<'de> Read<'de>,