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§

source

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.

Implementations on Foreign Types§

source§

impl<Offender> OnOffenceHandler<Offender> for ()

source§

fn on_offence(_offenders: &[OffenceDetails<Offender>])

Implementors§