Struct flattiverse_connector::controllable::EnergyCost
source · pub struct EnergyCost { /* private fields */ }
Implementations
sourceimpl EnergyCost
impl EnergyCost
pub fn new(
limit: f32,
extended_limit: f32,
cost_energy: Polynomial,
cost_particles: Polynomial,
cost_ions: Polynomial,
extended_cost_energy: Polynomial,
extended_cost_particles: Polynomial,
extended_cost_ions: Polynomial
) -> EnergyCost
pub fn from_reader(
connector: &Arc<Connector>,
reader: &mut dyn BinaryReader
) -> Result<EnergyCost, Error>
pub fn calculate_energy_usage(
&self,
value: f32,
energy: &mut f32,
particles: &mut f32,
ions: &mut f32,
controllable: &dyn Controllable
) -> Result<bool, Error>
pub fn cost_energy(&self, value: f32) -> f32
pub fn cost_energy_polynomial(&self) -> &Polynomial
pub fn cost_particles(&self, value: f32) -> f32
pub fn cost_particles_polynomial(&self) -> &Polynomial
pub fn cost_ions(&self, value: f32) -> f32
pub fn cost_ions_polynomial(&self) -> &Polynomial
pub fn extended_cost_energy(&self, value: f32) -> f32
pub fn extended_cost_energy_polynomial(&self) -> &Polynomial
pub fn extended_cost_particles(&self, value: f32) -> f32
pub fn extended_cost_particles_polynomial(&self) -> &Polynomial
pub fn extended_cost_ions(&self, value: f32) -> f32
pub fn extended_cost_ions_polynomial(&self) -> &Polynomial
pub fn limit(&self) -> f32
pub fn extended_limit(&self) -> f32
Trait Implementations
sourceimpl Clone for EnergyCost
impl Clone for EnergyCost
sourcefn clone(&self) -> EnergyCost
fn clone(&self) -> EnergyCost
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl !RefUnwindSafe for EnergyCost
impl Send for EnergyCost
impl Sync for EnergyCost
impl Unpin for EnergyCost
impl !UnwindSafe for EnergyCost
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more