pub struct ElectronInput {
pub electron: ElectronSpec,
pub materials: BTreeMap<String, MaterialSpec>,
pub target: TargetSpec,
pub run: ElectronRunSpec,
}Expand description
The whole electron run description.
Fields§
§electron: ElectronSpecEverything electron-specific.
materials: BTreeMap<String, MaterialSpec>Named materials (as in an ion run).
target: TargetSpecThe layered target (as in an ion run).
run: ElectronRunSpecHistory count, seed and threads.
Implementations§
Source§impl ElectronInput
impl ElectronInput
Sourcepub fn is_electron_toml(text: &str) -> bool
pub fn is_electron_toml(text: &str) -> bool
Whether a TOML document is an electron input: it has a top-level
electron table.
Sourcepub fn from_toml_str(text: &str) -> Result<Self, InputError>
pub fn from_toml_str(text: &str) -> Result<Self, InputError>
Parse a TOML document (schema errors name the key and line).
Sourcepub fn to_toml_string(&self) -> Result<String, InputError>
pub fn to_toml_string(&self) -> Result<String, InputError>
The input as a TOML document in the same schema.
Sourcepub fn resolve(&self) -> Result<ResolvedElectron, InputError>
pub fn resolve(&self) -> Result<ResolvedElectron, InputError>
Validate everything with relative data paths taken from the current directory.
Sourcepub fn resolve_in(
&self,
base_dir: &Path,
) -> Result<ResolvedElectron, InputError>
pub fn resolve_in( &self, base_dir: &Path, ) -> Result<ResolvedElectron, InputError>
Validate everything, read the data files (paths relative to
base_dir, the input file’s directory) and build the engine’s
inputs. Errors name the offending key.
Trait Implementations§
Source§impl Clone for ElectronInput
impl Clone for ElectronInput
Source§fn clone(&self) -> ElectronInput
fn clone(&self) -> ElectronInput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ElectronInput
impl Debug for ElectronInput
Source§impl<'de> Deserialize<'de> for ElectronInput
impl<'de> Deserialize<'de> for ElectronInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ElectronInput
impl PartialEq for ElectronInput
Source§impl Serialize for ElectronInput
impl Serialize for ElectronInput
impl StructuralPartialEq for ElectronInput
Auto Trait Implementations§
impl Freeze for ElectronInput
impl RefUnwindSafe for ElectronInput
impl Send for ElectronInput
impl Sync for ElectronInput
impl Unpin for ElectronInput
impl UnsafeUnpin for ElectronInput
impl UnwindSafe for ElectronInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more