Trait necsim_core::reporter::Reporter

source ·
pub trait Reporter: Debug {
    type ReportSpeciation: Boolean;
    type ReportDispersal: Boolean;
    type ReportProgress: Boolean;

    // Required methods
    fn report_speciation(
        &mut self,
        event: &MaybeUsed<SpeciationEvent, Self::ReportSpeciation>
    );
    fn report_dispersal(
        &mut self,
        event: &MaybeUsed<DispersalEvent, Self::ReportDispersal>
    );
    fn report_progress(
        &mut self,
        remaining: &MaybeUsed<u64, Self::ReportProgress>
    );

    // Provided methods
    fn initialise(&mut self) -> Result<(), String> { ... }
    fn finalise(self)
       where Self: Sized { ... }
    unsafe fn finalise_boxed(self: Box<Self>) { ... }
}

Required Associated Types§

Required Methods§

Provided Methods§

source

fn initialise(&mut self) -> Result<(), String>

This initialise hook can be used to commit to make final initialisation steps which have side effects.

§Errors

Return an error String iff initialisation failed. The calling code should take this as a hint to abort.

source

fn finalise(self)
where Self: Sized,

source

unsafe fn finalise_boxed(self: Box<Self>)

§Safety

This method should not be implemented manually

Implementors§