pub trait IntoV1Many {
type Output;
// Required method
fn into_v1_many(self) -> Result<Vec<Self::Output>, ProtocolConversionError>;
}unstable_protocol_v2 only.Expand description
Converts a value from the v2 draft type namespace into one or more v1 values.
Use this trait for protocol values where a single v2 value may need to fan out into multiple v1 values. For example, a whole v2 message update contains an array of content blocks, while v1 represents those blocks as separate chunk updates.
This is intentionally not blanket-implemented for every IntoV1 type.
Keeping one-to-one and one-to-many conversions separate makes future v2
fan-out cases explicit and avoids trait coherence conflicts when an
existing one-to-one shape grows a v2-only variant that needs fan-out.
Required Associated Types§
Required Methods§
Sourcefn into_v1_many(self) -> Result<Vec<Self::Output>, ProtocolConversionError>
fn into_v1_many(self) -> Result<Vec<Self::Output>, ProtocolConversionError>
Converts this value into one or more corresponding v1 items.
§Errors
Returns ProtocolConversionError when a value cannot be represented in v1.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".