pub trait DefaultSerde:
Send
+ Sync
+ 'static
+ Sized {
type Serde: SerdeAssociate<Target = Self> + Serde<Self> + Clone + Default + 'static;
}Expand description
Mapping trait for types that have a default associated Serde.
A type that does not implement this trait cannot use .stream or the other
ergonomic methods. The compiler reports that it found no default serde.
§Examples
ⓘ
use krabka_client_streams::{StreamsBuilder, KStream};
struct CustomType;
let builder = StreamsBuilder::new();
// Fails because CustomType does not implement DefaultSerde:
let stream: KStream<CustomType, String> = builder.stream(["topic"]);Required Associated Types§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".