pub trait OnOffenceHandler<Offender> {
// Required method
fn on_offence(offenders: &[OffenceDetails<Offender>]);
}
Expand description
A trait to take action on an offence.
Used to decouple the module that handles offences and the one that should punish for those offences.
Required Methods§
sourcefn on_offence(offenders: &[OffenceDetails<Offender>])
fn on_offence(offenders: &[OffenceDetails<Offender>])
A handler for an offence of a particular kind.
Note that this contains a list of all previous offenders
as well. The implementer should cater for a case, where
the same farmers were reported for the same offence
in the past (see OffenceCount
).
Object Safety§
This trait is not object safe.