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§
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§
sourcefn initialise(&mut self) -> Result<(), String>
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.
fn finalise(self)where
Self: Sized,
sourceunsafe fn finalise_boxed(self: Box<Self>)
unsafe fn finalise_boxed(self: Box<Self>)
§Safety
This method should not be implemented manually