pub trait WithinRepeatLevel<'w>: 'w {
// Required methods
fn level_display_name() -> &'static str;
fn current(ctx: &'w Context<'_>) -> Option<&'w Self>;
fn for_each<'c, F, E>(ctx: &'c Context<'c>, call: F) -> Result<(), E>
where F: FnMut(&Context<'_>, &Self) -> Result<(), E>,
'c: 'w;
// Provided method
fn missing_repeat_level_special_error(
_ctx: &'w Context<'_>,
_span: Span,
) -> Option<Error> { ... }
}Expand description
Implemented for WithinVariant and WithinField
For combining code that applies similarly for different repeat levels.
Required Methods§
fn level_display_name() -> &'static str
fn current(ctx: &'w Context<'_>) -> Option<&'w Self>
Provided 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.