Skip to main content

Model

Struct Model 

Source
pub struct Model {
Show 37 fields pub entry: &'static MachineEntry, pub lang: &'static str, pub tr: Translations, pub config: Config, pub file: String, pub session: Session, pub scopes: Vec<Scope>, pub history: History, pub frozen: Option<History>, pub runs: RunStore, pub units: Units, pub window_s: f64, pub scene: Scene, pub paused: bool, pub speed: f64, pub exaggeration: f64, pub target: Vec<f64>, pub messages: Vec<Message>, pub tuning_axis: usize, pub tuning: Option<Tuning>, pub inputs: Inputs, pub cycle_report: Option<(CycleLoad, Vec<Verdict>, Curves)>, pub bands: Option<Vec<Band>>, pub band_samples: usize, pub worst: Option<(Vec<Worst>, Vec<String>)>, pub sensitivity: Option<(CycleLoad, Vec<Sensitivity>)>, pub optimised: Option<Optimised>, pub candidates: Option<(Vec<Candidate>, String)>, pub path_run: Option<PathRun>, pub trail: Option<Vec<[f64; 3]>>, pub trace_fit: Option<TraceFit>, pub sweeps: Option<Vec<Vec<SweepPoint>>>, pub sweep_fit: Option<(usize, SweepFit)>, pub comparison: Option<(String, Comparison)>, pub views: Views, pub loop_response: LoopResponse, pub insight: Insight, /* private fields */
}

Fields§

§entry: &'static MachineEntry§lang: &'static str§tr: Translations§config: Config

The config as edited. The simulation may yet refuse the last edits.

§file: String

The file the config was last opened from or saved to (“” for none): apart from the field a path is typed into, which may name a file about to be opened. A JSON machine file is held here too (to be reopened at the next start), though Save does not write over it (save_target).

§session: Session§scopes: Vec<Scope>§history: History§frozen: Option<History>

The scopes’ window as it was when they were frozen; the simulation runs on meanwhile. Only the window is kept, not the whole history, which on the six-axis arm is a hundred megabytes.

§runs: RunStore

The runs kept for comparing (runs), and the units speeds and lengths are shown in.

§units: Units§window_s: f64

Seconds of history the scopes show.

§scene: Scene§paused: bool§speed: f64§exaggeration: f64

How many times larger the 3D view draws the parts’ deflections (Scene::exaggeration).

§target: Vec<f64>

Target of the next point-to-point move, per axis.

§messages: Vec<Message>§tuning_axis: usize§tuning: Option<Tuning>§inputs: Inputs§cycle_report: Option<(CycleLoad, Vec<Verdict>, Curves)>

Results of the analysis panel, each for the config as it was when it was asked for. With the motors’ torque-speed curves, to plot the operating points over.

§bands: Option<Vec<Band>>

The checks of the cycle with their error bands, where the cycle was analysed with them.

§band_samples: usize

How many samples those bands are of; 0: each bounded value alone at its low and at its high bound.

§worst: Option<(Vec<Worst>, Vec<String>)>

Per check the worst corner of the bounds found, and the paths of the bounds in the order its high has them.

§sensitivity: Option<(CycleLoad, Vec<Sensitivity>)>

The cycle as configured and the varied parameters, strongest first.

§optimised: Option<Optimised>§candidates: Option<(Vec<Candidate>, String)>

The motors of the search as ranked, and the supply they were searched for.

§path_run: Option<PathRun>§trail: Option<Vec<[f64; 3]>>

Where the tool has been in the 3D scene since the machine took the planned path, a point per 0.1 mm of travel and the newest session::TRAIL of them: the path it really took, to draw beside the planned one. None before the machine has taken a path (it may refuse it), and after a reconfigure or the start of a cycle.

§trace_fit: Option<TraceFit>§sweeps: Option<Vec<Vec<SweepPoint>>>

Per motor the frequency response, at the frequencies inputs gave when it was asked for.

§sweep_fit: Option<(usize, SweepFit)>

The measured response’s fit, and the motor it was taken on.

§comparison: Option<(String, Comparison)>

The effect comparison, with the effect that was switched.

§views: Views

The search’s views, the ratio sweep, the kinematics comparison and the path tab’s move maps (search_views).

§loop_response: LoopResponse

The loop-response tab’s measurement and its result (frequency).

§insight: Insight

The mode list, the band runs over the cycle’s traces and their job (insight).

Implementations§

Source§

impl Model

Source

pub fn new(entry: &'static MachineEntry, lang: &'static str) -> Self

Source

pub fn set_machine(&mut self, entry: &'static MachineEntry)

Switching machine restarts the simulation with that machine’s default config.

Source

pub fn open_config(&mut self, path: &str)

Opens a config file for the machine shown: it replaces the running config, as switching machine does. A file that cannot be read, or that the machine refuses, is reported and the running config stays. A config of another machine (one this machine refuses and that one reads) switches to that machine. A machine file (one with a [machine] table, or any .json; see docs/machine-files.md) brings its own machine and replaces the machine shown too.

Source

pub fn save_config(&mut self, path: &str)

Writes the config as edited to a file: over the text it was read from, so that the comments and layout of that file stay, wherever only values have changed. A file that holds a config of another machine is not overwritten.

Source

pub fn apply_parts(&mut self)

Names the parts typed in inputs.parts in the config and applies it to the running simulation, as the motor search’s button does. A name the catalogue does not have is refused, and so is any name in a config without [parts], as on the command line.

Source

pub fn set_language(&mut self, lang: &'static str)

Source

pub fn set_paused(&mut self, paused: bool)

Source

pub fn set_speed(&mut self, speed: f64)

Source

pub fn set_exaggeration(&mut self, factor: f64)

Source

pub fn set_param(&mut self, path: &str, value: Value)

Edits one config value and applies the config to the running simulation.

Source

pub fn save_target(&self) -> Option<String>

Where Save puts the config without asking: the file last opened or saved to, but not a JSON machine file (the config is written as TOML); None where the file dialog is to be asked.

Source

pub fn save_suggestion(&self) -> String

Where the file dialog starts when Save is asked for over an open and save_target has no file: beside the JSON machine file the config came from, as TOML; nowhere for a config from no file (not the field, which names the file about to be opened).

Source

pub fn dirty(&self) -> bool

The config differs from what was last opened, saved or taken from the machine’s default.

Source

pub fn can_undo(&self) -> bool

Source

pub fn can_redo(&self) -> bool

Source

pub fn undo(&mut self)

Takes the last edit of the config back, and applies the config to the running simulation.

Source

pub fn redo(&mut self)

Does the edit again that undo took back.

Source

pub fn set_value(&mut self, assignment: &str)

Applies one path = value (TOML value) to the config and the running simulation, as sim-cli --set does: a key the config does not have, a value of another type or text that is no assignment is refused with the CLI’s message; a value the simulation refuses (outside a bound) comes back with poll, as with any edit.

Source

pub fn set_at_start(&mut self, assignments: &[String]) -> Result<(), Message>

sim-app --set path=value, each in turn, before the window opens: the machine restarts with them, and a saved file still has the comments and order of the one read. The first refusal is returned, with nothing applied.

Source

pub fn command(&mut self, command: Command)

Source

pub fn poll(&mut self)

Takes in what the simulation and a running tuning job have produced since the last frame.

Source

pub fn set_frozen(&mut self, frozen: bool)

Freezing keeps the traces in the window as they are for a closer look; the simulation runs on.

Source

pub fn visible_rows( &self, ) -> impl DoubleEndedIterator<Item = &[f64]> + ExactSizeIterator + Clone

The rows the scopes show: the last window_s seconds of the live or the frozen history.

Source

pub fn stats(&self, signal: usize) -> Option<Stats>

What a trace did in the scopes’ window. All signals’ are worked out in one pass over the window and kept while the scopes show the same, so a frame with many lines does not go over the window once per line.

Source

pub fn export_traces(&mut self, path: &Path)

Writes what the scopes show (every signal, the visible time window) as CSV, in the background: a minute of the six-axis arm is some hundred megabytes of text. The message comes with poll.

Source

pub fn exporting(&self) -> bool

CSV files still being written.

Source

pub fn rated(&self, run: Run) -> Run

run with what the config’s machine says about its motors and resonances (Run::rated).

Source

pub fn rated_with(&self, run: Run, config: &Config) -> Run

rated for a run made with another config of this machine (the compared ghost’s).

Source

pub fn keep_live(&mut self)

Keeps what the scopes show (the live or frozen window) as a run.

Source

pub fn record_run(&mut self, assignments: &str, file: &str)

Records the configured cycle of another config as a run, in the background: the config shown, or the config or machine file file (of any machine), with each of assignments applied as sim-cli --set does (separated by ; or new lines), e.g. another motor through parts.motor = "1FK2208-4AF" or another gain. A file or an assignment that is refused is said, and nothing runs.

Source

pub fn recording_runs(&self) -> bool

Runs still being recorded.

Source

pub fn run_plots(&self) -> Vec<RunPlot>

The shown runs per quantity of Quantity::ALL that one of them has (see RunPlot), in the chosen units.

Source

pub fn runs_table(&self) -> Option<Table>

The key figures of the kept runs side by side (runs::Figures): one column per run, the reference marked, then one column per other run with its value less the reference’s (“Δ label”; for the verdicts, the failed checks less the reference’s), in the chosen units. None with no run kept.

Source

pub fn report_running(&self) -> bool

Source

pub fn export_report(&mut self, path: &str)

Writes the sizing report of the config as it is now (sim_components::report) to path, as PDF for a name ending in .pdf and as HTML otherwise, with the error bands where the analysis panel asks for them. In the background: the cycle and the bands take a while.

Source

pub fn tuning_running(&self) -> bool

Source

pub fn run_tuning(&mut self, axis: usize)

Measures step and frequency response of one axis with the config as it is now, in the background on a simulation of its own. The running machine is not disturbed.

Source

pub fn analysis_running(&self) -> bool

Source

pub fn running(&self, kind: Analysis) -> bool

Source

pub fn working(&self) -> bool

Any background job is still under way: its answer comes with poll, which the window must go on calling, so it does not idle meanwhile (update_mode in main.rs).

Source

pub fn job_progress(&self, job: JobRef) -> Option<Arc<Progress>>

The progress (runs done and planned so far, the plan grows as the job goes) and the cancel switch of a background job under way; None where there is none.

Source

pub fn job_counts(&self, job: JobRef) -> Option<(usize, usize)>

Runs done and planned of a job under way. Planned 0: it has not counted anything yet.

Source

pub fn cancel_job(&self, job: JobRef)

Stops a background job: it stops starting runs and poll takes it as ended, with a message that it was cancelled; what was computed before stays as it was. A run already started is not interrupted.

Source

pub fn has_result(&self, kind: Analysis) -> bool

Source

pub fn outdated(&self, kind: Analysis) -> bool

The result of this kind was computed for a config that has been changed since. A motor search does not depend on the parts the config names, so naming one of its motors does not outdate it.

Source

pub fn run_analysis(&mut self, kind: Analysis)

Starts one computation of the analysis panel with the config as it is now, in the background on simulations of its own, like the tuning measurement. The running machine is not disturbed.

The search, the path and the trace take what inputs holds at this moment. A path is planned from where the machine stands, and when its analysis is back the machine runs it too (see poll).

Source

pub fn clear(&mut self, kind: Analysis)

Forgets the result of one kind of analysis.

Source

pub fn clear_analysis(&mut self)

Source

pub fn use_candidate(&mut self, row: usize)

Names a motor of the search (and its gearbox, where it was searched with one, its drive and its axis, where it was tried on one) in [parts] of the config and applies it to the running simulation: the row of search_table after the header. A row of an axis ruled out has no motor and names nothing. The candidate passed or failed on the config that was searched, so over a config changed since in anything but its part names nothing is applied.

Source

pub fn apply_optimised(&mut self)

Puts the settings the optimiser found into the config and applies it to the running simulation. They are absolute values, found for the config the optimiser started with: over a config edited since they would undo an edit, or fail a check they were found to pass. Then nothing is applied; the result stays, for when the edit is taken back.

Source

pub fn cycle_tables(&self) -> Vec<Table> ⓘ

The analysed cycle as the tables of load_tables. Empty until a cycle was analysed.

Source

pub fn worst_table(&self) -> Option<Table>

The worst corners of the bounds, where the cycle was analysed with that search: per check and motor the worst value found, its limit there and the result, and which bounded values are at their high and which at their low bound (their config paths, separated by commas).

Source

pub fn check_key(&self, check: &str, motor: Option<usize>) -> String

The label key of a check (report::check_key): the motor’s kind decides its unit; without a motor the first one’s.

Source

pub fn search_table(&self) -> Option<Table>

The motors of the search as ranked: passing ones first, cheapest first. Per motor its gearbox and axis (empty: the config’s own), the mass of motor and gearbox, the installed mass that stands in for the price (Candidate::cost), result, and the check nearest to its limit with value over limit, or why the cycle was not run. An axis ruled out by its catalogue numbers has a row without motor. No more columns than the panel is wide: the cycle analysis has the rest.

Source

pub fn path_tables(&self) -> Vec<Table> ⓘ

The path that was run as the three tables of load_tables. Empty until a path was run.

Source

pub fn path_plot(&self) -> Option<(String, String, Vec<[f64; 2]>)>

The planned path for a plot, with the labels of its two directions: the second axis over the first, or on a machine with one axis its position over the time.

Source

pub fn trace_tables(&self) -> Vec<Table> ⓘ

The replayed trace as two tables: per motor how far the simulation is from the trace (torque and following error, RMS and peak of the difference), and per axis and fitted value what the config has, what the trace says and the standard error of that. Empty until a trace was replayed.

Source

pub fn trace_advice(&self) -> Vec<String>

What the fit says to change in the config, one line per value, and which axis it could not fit.

Source

pub fn overlay(&self) -> &Overlay

Measured against simulated, per quantity of OVERLAY_KEYS (torque, speed, following error at the motor) and per motor: (time, measured value) and (time, simulated value). Empty until a trace was replayed. Worked out once, when the trace arrives: a frame used to copy the whole trace for it.

Source

pub fn export_overlay(&mut self, path: &Path)

Writes the overlay as sim-cli replay --out does, in the background; the message comes with poll.

Source

pub fn points_table(&self, rows: Range<usize>) -> Option<(usize, Table)>

The operating points of the analysed cycle, as sim-cli analyze --points writes them, motor after motor: how many there are, and the header with the rows in rows. None until a cycle was analysed.

Source

pub fn speed_label(&self) -> String

The label of the motor speed’s axis in the unit chosen; m/s where every motor is linear.

Source

pub fn torque_label(&self) -> String

The label of the motor torque’s axis: a force in N where every motor is linear.

Source

pub fn motor_is_linear(&self, k: usize) -> bool

Whether motor k is linear (Machine::motor_linear).

Source

pub fn motor_speed_label(&self, k: usize) -> String

The speed axis label of motor k’s chart: a machine with rotary and linear motors has each on its own unit.

Source

pub fn motor_torque_label(&self, k: usize) -> String

The torque axis label of motor k’s chart.

Source

pub fn motors_linear(&self) -> bool

Whether every motor of the machine is linear (Machine::motor_linear): speeds in m/s, forces in N.

Source

pub fn speed_scale(&self) -> f64

The factor of the motor speeds in the unit chosen: rpm applies to rotary motors only.

Source

pub fn motor_speed_scale(&self, k: usize) -> f64

The factor of motor k’s speeds: 1 for a linear motor (m/s), else the unit chosen.

Source

pub fn points_plot( &self, kind: Analysis, ) -> Option<(Vec<Vec<[f64; 2]>>, Curves)>

The operating points per motor as (speed, torque), and the torque-speed curves (Curves): of the analysed cycle (Analysis::Cycle) or of the path that was run (Analysis::Path). None until there is one.

Source

pub fn breakdown_lines(&self) -> Vec<(String, Vec<(String, Vec<[f64; 2]>)>)>

The parts of each motor’s torque over the scopes’ time window: per motor its name with the unit, and per part of TORQUE_PARTS and then the torque itself the label and the points (time, torque). Empty for a machine that does not report the parts.

Source

pub fn breakdown_table(&self) -> Option<Table>

The parts of each motor’s torque over the analysed cycle: one row per part and one for the torque itself, per motor its peak and its RMS in N m. None until a cycle was analysed, and for a machine that does not report the parts.

Source

pub fn budget_table(&self) -> Option<Table>

Where the energy drawn from the supply over the analysed cycle went: the supply, every row of the budget that is not exactly zero (an effect that is off), and what is not accounted for; in J and in percent of the supply. None until a cycle was analysed, and for a machine that does not report its losses.

Source

pub fn budget_flows(&self) -> Option<[Vec<(String, f64)>; 3]>

The energy budget of the analysed cycle as a flow diagram, in three columns of (label, energy in J), every energy above zero. The first holds the supply and every store that gave energy back over the cycle (a row of the budget below zero); the second what the electrical side lost or stored (the rows EnergyBudget:: electrical_unaccounted counts, and what that leaves), and last the shaft work, with what the machine’s stores gave back; the third what the machine lost or stored, and what its own balance leaves. So the first column adds up to the second, the second’s last to the third, and the second and third less what the first has beyond the supply are the supply, as the budget’s rows and what it leaves unaccounted are. Rows that are exactly zero (an effect that is off) are left out, as in budget_table. None where that has nothing.

Source

pub fn workspace_slice(&self, n: usize) -> Option<Arc<WorkspaceSlice>>

A horizontal slice through what the machine can reach, at the height inputs.workspace_z (the middle of the third axis’s range where it is None, and within that range), for the workspace map: per node of a grid the condition number of the kinematics there (Machine::condition). The grid spans the first two axes’ ranges and half of their width beyond each end, so that the reach shows where it goes past the travel range. None for a machine with fewer than three axes or no condition to tell, and for a config it does not build. Worked out once per config, height and grid: 3721 nodes each frame cost the path tab its frame rate.

Source

pub fn friction_views(&self) -> Vec<FrictionView>

Per friction contact of the machine its curve of steady sliding and where it is now (see FrictionView). The curve runs over the axis’s speed limit both ways, with its points closer together near standstill, where the Stribeck drop is. Empty for a machine that tells no contacts, or a config it does not build.

Source

pub fn thermal_view(&self) -> ThermalView

The thermal view (see ThermalView). The windings are rated for motor.rated_temperature_rise_k, the parts for thermal.<kind>_max_rise_k; a part settles at its thermal resistance times its mean loss over the analysed cycle (CycleLoad::part_rises), a winding at MotorLoad::winding_rise. The share of the rating is that of the settled rise, which is what the verdicts judge (the rise now is a climb of many minutes); above 100 % it is marked.

Source

pub fn belt_view(&self) -> Option<BeltView>

The belt view (see BeltView); None for a machine that tells no belt sections. Stretch in mm.

Source

pub fn compare_view(&self) -> Option<CompareView>

The effect comparison (see CompareView) for the quantity inputs.compare_quantity; None before one was run, and for a quantity the comparison has no signal of.

Source

pub fn sweep_table(&self) -> Option<Table>

One row per figure, one column per motor: the resonance of the load on the belt in each frequency response (identify::resonance), and its damping ratio. Empty where a response has no dip with both flanks. None until a sweep was run.

Source

pub fn sweep_fit_table(&self) -> Option<Table>

The fit of a measured frequency response, as sim-cli fit --sweep writes it: resonance and damping of the config’s own response and of the measured one, and the standard error of the frequency.

Source

pub fn sweep_fit_advice(&self) -> Option<String>

What the fit of a measured frequency response says to change in the config.

Source

pub fn sensitivity_table(&self) -> Option<Table>

The parameters the cycle depends on most, strongest first: the low and high value each was run with, and what that did to peak torque, RMS torque and cycle time, in percent.

Source

pub fn optimised_table(&self) -> Option<Table>

The optimiser’s result: cycle time and settling before and after, and every setting it would change.

Source

pub fn optimised_front(&self) -> Option<(Vec<[f64; 2]>, f64)>

The optimiser’s front of energy against cycle time (Optimised::front): (cycle time, energy per cycle) of each point, and the result’s cycle time.

Source

pub fn signal_label(&self, signal: &SignalInfo) -> String

“X axis · Following error [m]”

Source

pub fn effects(&self) -> Vec<(String, String, bool)>

The effect switches: (config path, label key, on).

Source

pub fn param_groups(&self) -> Vec<ParamGroup>

The parameter panel: every numeric config value, grouped by its table.

Source

pub fn param_matches(&self, path: &str, filter: &str) -> bool

Whether the parameter path is listed under filter: its label (in the language shown) or its dotted path holds the filter, in any case. An empty filter lists all.

Source

pub fn changed_params(&self) -> Vec<(String, String, Option<Value>, Value)>

The values of the config that differ from the machine’s default: the dotted path, its label, the default and the value now, in the config’s order. Values the default does not have (a machine file’s extra keys) are listed with the default as None.

Source

pub fn find_modes(&mut self)

The machine’s modes at the pose its setpoint stands at (where it starts, before any sample), each with its shape and the stiffness it lives in (insight::mode_views), for the mode list. The 3D view goes back to the machine’s own mode.

Source

pub fn pick_mode(&mut self, i: Option<usize>)

Shows mode i of the mode list swinging in the 3D view; None, the machine’s own (Machine::mode_shape).

Source

pub fn modes_outdated(&self) -> bool

The mode list was found for a config that has changed since.

Source

pub fn modes_table(&self) -> Option<Table>

The mode list as a table: per mode its frequency and damping (in %) as the machine reports them, the mode of the linearised model its shape is of where it is that one’s, where the shape comes from, and the kinds of stiffness that hold at least 5 % of its strain energy, largest first. None before the modes were asked for.

Source

pub fn path_quantities(&self) -> Vec<PathQuantity>

What the path that was run can be coloured by: the quantities its run has (PathQuantity::values).

Source

pub fn path_quantity_label(&self, quantity: PathQuantity) -> String

A quantity’s label: motor k’s utilisation with the motor’s name.

Source

pub fn path_colours(&self) -> Option<Arc<PathColours>>

The path that was run, coloured by inputs.path_colour (insight::PathColours): per millisecond of the run the tool’s place in the scene (Machine::scene_point of the axes’ positions) and the quantity’s value there, and the sample of its highest value. None without a path, a quantity, or a place in the scene for the tool.

Source

pub fn path_values_at(&self, i: usize) -> Table

Every quantity of path_quantities at sample i of the path that was run, with the time, as a table of label, value and unit.

Source

pub fn trace_bands(&mut self)

Runs the cycle with each bounded value at its bounds in the background and keeps their traces’ envelope (insight::band_runs); the answer comes with poll.

Source

pub fn bands_tracing(&self) -> bool

The bounds runs are being run.

Source

pub fn bands_outdated(&self) -> bool

The bounds runs are of a config that has changed since.

Source

pub fn band_plots(&self) -> Vec<(String, Vec<[f64; 2]>, Vec<[f64; 4]>)>

The traces of the bounds runs for the plots: per traced signal its title with the unit, the nominal trace (time, value) with its peaks kept (plot_line), and the envelope in at most BAND_BUCKETS stretches, each from its first time to the next one’s with the lowest and highest value of the stretch: [t0, t1, low, high].

Source

pub fn band_points(&self) -> Vec<Vec<[f64; 2]>>

Per motor the operating points of the bounds runs (speed in the unit chosen, torque), for the cloud on the torque-speed view; empty before the bounds were run.

Source

pub fn keys_in_use(&self) -> Vec<String>

Every translation key the panels and the 3D view can show for the current machine.

Auto Trait Implementations§

§

impl !Freeze for Model

§

impl !RefUnwindSafe for Model

§

impl !UnwindSafe for Model

§

impl Send for Model

§

impl Sync for Model

§

impl Unpin for Model

§

impl UnsafeUnpin for Model

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T, U> AsBindGroupShaderType<U> for T
where U: ShaderType, &'a T: for<'a> Into<U>,

§

fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U

Return the T [ShaderType] for self. When used in [AsBindGroup] derives, it is safe to assume that all images in self exist.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> ConditionalSend for T
where T: Send,

§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSend for T
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

§

const WITNESS: W = W::MAKE

A constant of the type witness
§

impl<T> Identity for T
where T: ?Sized,

§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> IntoResult<T> for T

§

fn into_result(self) -> Result<T, RunSystemError>

Converts this type into the system output type.
§

impl<A> Is for A
where A: Any,

§

fn is<T>() -> bool
where T: Any,

Checks if the current type “is” another type, using a TypeId equality comparison. This is most useful in the context of generic logic. Read more
§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> Settings for T
where T: 'static + Send + Sync,

§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more