Struct TimeSeries
pub struct TimeSeries { /* private fields */ }Expand description
An iterator of a sequence of evenly spaced Epochs.
(Python documentation hints) :type start: Epoch :type end: Epoch :type step: Duration :type inclusive: bool
Implementations§
§impl TimeSeries
impl TimeSeries
pub fn exclusive(start: Epoch, end: Epoch, step: Duration) -> TimeSeries ⓘ
pub fn exclusive(start: Epoch, end: Epoch, step: Duration) -> TimeSeries ⓘ
Return an iterator of evenly spaced Epochs, inclusive on start and exclusive on end.
use hifitime::{Epoch, Unit, TimeSeries};
let start = Epoch::from_gregorian_utc_at_midnight(2017, 1, 14);
let end = Epoch::from_gregorian_utc_at_noon(2017, 1, 14);
let step = Unit::Hour * 2;
let time_series = TimeSeries::exclusive(start, end, step);
let mut cnt = 0;
for epoch in time_series {
println!("{}", epoch);
cnt += 1
}
assert_eq!(cnt, 6)pub fn first_epoch(&self) -> Epoch
pub fn first_epoch(&self) -> Epoch
Returns first Epoch of this TimeSeries, without consuming the iterator.
pub fn last_epoch(&self) -> Epoch
pub fn last_epoch(&self) -> Epoch
Returns last Epoch of this TimeSeries, without consuming the iterator.
pub fn inclusive(start: Epoch, end: Epoch, step: Duration) -> TimeSeries ⓘ
pub fn inclusive(start: Epoch, end: Epoch, step: Duration) -> TimeSeries ⓘ
Return an iterator of evenly spaced Epochs, inclusive on start and on end.
use hifitime::{Epoch, Unit, TimeSeries};
let start = Epoch::from_gregorian_utc_at_midnight(2017, 1, 14);
let end = Epoch::from_gregorian_utc_at_noon(2017, 1, 14);
let step = Unit::Hour * 2;
let time_series = TimeSeries::inclusive(start, end, step);
let mut cnt = 0;
for epoch in time_series {
println!("{}", epoch);
cnt += 1
}
assert_eq!(cnt, 7)Examples found in repository?
35fn main() -> Result<(), Box<dyn Error>> {
36 pel::init();
37
38 // ====================== //
39 // === ALMANAC SET UP === //
40 // ====================== //
41
42 // Dynamics models require planetary constants and ephemerides to be defined.
43 // Let's start by grabbing those by using ANISE's MetaAlmanac.
44
45 let data_folder: PathBuf = [env!("CARGO_MANIFEST_DIR"), "examples", "04_lro_od"]
46 .iter()
47 .collect();
48
49 let meta = data_folder.join("lro-dynamics.dhall");
50
51 // Load this ephem in the general Almanac we're using for this analysis.
52 let mut almanac = MetaAlmanac::new(meta.to_string_lossy().as_ref())
53 .map_err(Box::new)?
54 .process(true)
55 .map_err(Box::new)?;
56
57 let mut moon_pc = almanac.get_planetary_data_from_id(MOON).unwrap();
58 moon_pc.mu_km3_s2 = 4902.74987;
59 almanac.set_planetary_data_from_id(MOON, moon_pc).unwrap();
60
61 let mut earth = almanac.get_planetary_data_from_id(EARTH).unwrap();
62 earth.mu_km3_s2 = 398600.436;
63 almanac.set_planetary_data_from_id(EARTH, earth).unwrap();
64
65 // Save this new kernel for reuse.
66 // In an operational context, this would be part of the "Lock" process, and should not change throughout the mission.
67 almanac
68 .planetary_data
69 .values()
70 .next()
71 .unwrap()
72 .save_as(&data_folder.join("lro-specific.pca"), true)?;
73
74 // Lock the almanac (an Arc is a read only structure).
75 let almanac = Arc::new(almanac);
76
77 // Orbit determination requires a Trajectory structure, which can be saved as parquet file.
78 // In our case, the trajectory comes from the BSP file, so we need to build a Trajectory from the almanac directly.
79 // To query the Almanac, we need to build the LRO frame in the J2000 orientation in our case.
80 // Inspecting the LRO BSP in the ANISE GUI shows us that NASA has assigned ID -85 to LRO.
81 let lro_frame = Frame::from_ephem_j2000(-85);
82
83 // To build the trajectory we need to provide a spacecraft template.
84 let sc_template = Spacecraft::builder()
85 .mass(Mass::from_dry_and_prop_masses(1018.0, 900.0)) // Launch masses
86 .srp(SRPData {
87 // SRP configuration is arbitrary, but we will be estimating it anyway.
88 area_m2: 3.9 * 2.7,
89 coeff_reflectivity: 0.96,
90 })
91 .orbit(Orbit::zero(MOON_J2000)) // Setting a zero orbit here because it's just a template
92 .build();
93 // Now we can build the trajectory from the BSP file.
94 // We'll arbitrarily set the tracking arc to 24 hours with a five second time step.
95 let traj_as_flown = Traj::from_bsp(
96 lro_frame,
97 MOON_J2000,
98 almanac.clone(),
99 sc_template,
100 5.seconds(),
101 Some(Epoch::from_str("2024-01-01 00:00:00 UTC")?),
102 Some(Epoch::from_str("2024-01-02 00:00:00 UTC")?),
103 Aberration::LT,
104 Some("LRO".to_string()),
105 )?;
106
107 println!("{traj_as_flown}");
108
109 // ====================== //
110 // === MODEL MATCHING === //
111 // ====================== //
112
113 // Set up the spacecraft dynamics.
114
115 // Specify that the orbital dynamics must account for the graviational pull of the Earth and the Sun.
116 // The gravity of the Moon will also be accounted for since the spaceraft in a lunar orbit.
117 let mut orbital_dyn = OrbitalDynamics::point_masses(vec![EARTH, SUN, JUPITER_BARYCENTER]);
118
119 // We want to include the spherical harmonics, so let's download the gravitational data from the Nyx Cloud.
120 // We're using the GRAIL JGGRX model.
121 let mut jggrx_meta = MetaFile {
122 uri: "http://public-data.nyxspace.com/nyx/models/Luna_jggrx_1500e_sha.tab.gz".to_string(),
123 crc32: Some(0x6bcacda8), // Specifying the CRC32 avoids redownloading it if it's cached.
124 };
125 // And let's download it if we don't have it yet.
126 jggrx_meta.process(true)?;
127
128 // Build the spherical harmonics.
129 // The harmonics must be computed in the body fixed frame.
130 // We're using the long term prediction of the Moon principal axes frame.
131 let moon_pa_frame = MOON_PA_FRAME.with_orient(31008);
132 let sph_harmonics = GravityField::from_stor(
133 almanac.frame_info(moon_pa_frame)?,
134 GravityFieldData::from_shadr(&jggrx_meta.uri, 80, 80, true)?,
135 );
136
137 // Include the spherical harmonics into the orbital dynamics.
138 orbital_dyn.accel_models.push(sph_harmonics);
139
140 // We define the solar radiation pressure, using the default solar flux and accounting only
141 // for the eclipsing caused by the Earth and Moon.
142 // Note that by default, enabling the SolarPressure model will also enable the estimation of the coefficient of reflectivity.
143 let srp_dyn = SolarPressure::new(vec![EARTH_J2000, MOON_J2000], almanac.clone())?;
144
145 // Finalize setting up the dynamics, specifying the force models (orbital_dyn) separately from the
146 // acceleration models (SRP in this case). Use `from_models` to specify multiple accel models.
147 let dynamics = SpacecraftDynamics::from_model(orbital_dyn, srp_dyn);
148
149 println!("{dynamics}");
150
151 // Now we can build the propagator.
152 let setup = Propagator::default_dp78(dynamics.clone());
153
154 // For reference, let's build the trajectory with Nyx's models from that LRO state.
155 let (sim_final, traj_as_sim) = setup
156 .with(*traj_as_flown.first(), almanac.clone())
157 .until_epoch_with_traj(traj_as_flown.last().epoch())?;
158
159 println!("SIM INIT: {:x}", traj_as_flown.first());
160 println!("SIM FINAL: {sim_final:x}");
161 // Compute RIC difference between SIM and LRO ephem
162 let sim_lro_delta = sim_final
163 .orbit
164 .ric_difference(&traj_as_flown.last().orbit)?;
165 println!("{traj_as_sim}");
166 println!(
167 "SIM v LRO - RIC Position (m): {:.3}",
168 sim_lro_delta.radius_km * 1e3
169 );
170 println!(
171 "SIM v LRO - RIC Velocity (m/s): {:.3}",
172 sim_lro_delta.velocity_km_s * 1e3
173 );
174
175 traj_as_sim.ric_diff_to_parquet(
176 &traj_as_flown,
177 "./data/04_output/04_lro_sim_truth_error.parquet",
178 ExportCfg::default(),
179 )?;
180
181 // ==================== //
182 // === OD SIMULATOR === //
183 // ==================== //
184
185 // After quite some time trying to exactly match the model, we still end up with an oscillatory difference on the order of 150 meters between the propagated state
186 // and the truth LRO state.
187
188 // Therefore, we will actually run an estimation from a dispersed LRO state.
189 // The sc_seed is the true LRO state from the BSP.
190 let sc_seed = *traj_as_flown.first();
191
192 // Load the Deep Space Network ground stations.
193 // Nyx allows you to build these at runtime but it's pretty static so we can just load them from YAML.
194 let ground_station_file: PathBuf = [
195 env!("CARGO_MANIFEST_DIR"),
196 "examples",
197 "04_lro_od",
198 "dsn-network.yaml",
199 ]
200 .iter()
201 .collect();
202
203 let devices = GroundStation::load_named(ground_station_file)?;
204
205 let mut proc_devices = devices.clone();
206
207 // Increase the noise in the devices to accept more measurements.
208 for gs in proc_devices.values_mut() {
209 if let Some(noise) = &mut gs
210 .stochastic_noises
211 .as_mut()
212 .unwrap()
213 .get_mut(&MeasurementType::Range)
214 {
215 *noise.white_noise.as_mut().unwrap() *= 3.0;
216 }
217 }
218
219 // Typical OD software requires that you specify your own tracking schedule or you'll have overlapping measurements.
220 // Nyx can build a tracking schedule for you based on the first station with access.
221 let trkconfg_yaml: PathBuf = [
222 env!("CARGO_MANIFEST_DIR"),
223 "examples",
224 "04_lro_od",
225 "tracking-cfg.yaml",
226 ]
227 .iter()
228 .collect();
229
230 let configs: BTreeMap<String, TrkConfig> = TrkConfig::load_named(trkconfg_yaml)?;
231
232 // Build the tracking arc simulation to generate a "standard measurement".
233 let mut trk = TrackingArcSim::<Spacecraft, GroundStation>::with_seed(
234 devices.clone(),
235 traj_as_flown.clone(),
236 configs,
237 123, // Set a seed for reproducibility
238 )?;
239
240 trk.build_schedule(almanac.clone())?;
241 let arc = trk.generate_measurements(almanac.clone())?;
242 // Save the simulated tracking data
243 arc.to_parquet_simple("./data/04_output/04_lro_simulated_tracking.parquet")?;
244
245 // We'll note that in our case, we have continuous coverage of LRO when the vehicle is not behind the Moon.
246 println!("{arc}");
247
248 // Now that we have simulated measurements, we'll run the orbit determination.
249
250 // ===================== //
251 // === OD ESTIMATION === //
252 // ===================== //
253
254 let sc = SpacecraftUncertainty::builder()
255 .nominal(sc_seed)
256 .frame(LocalFrame::RIC)
257 .x_km(0.5)
258 .y_km(0.5)
259 .z_km(0.5)
260 .vx_km_s(5e-3)
261 .vy_km_s(5e-3)
262 .vz_km_s(5e-3)
263 .build();
264
265 // Build the filter initial estimate, which we will reuse in the filter.
266 let mut initial_estimate = sc.to_estimate()?;
267 initial_estimate.covar *= 3.0;
268
269 println!("== FILTER STATE ==\n{sc_seed:x}\n{initial_estimate}");
270
271 // Build the SNC in the Moon J2000 frame, specified as a velocity noise over time.
272 let process_noise = ProcessNoise3D::from_velocity_km_s(
273 &[1e-12, 1e-12, 1e-12],
274 1 * Unit::Hour,
275 10 * Unit::Minute,
276 None,
277 );
278
279 println!("{process_noise}");
280
281 // We'll set up the OD process to reject measurements whose residuals are move than 3 sigmas away from what we expect.
282 let odp = SpacecraftKalmanOD::new(
283 setup,
284 KalmanVariant::ReferenceUpdate,
285 Some(ResidRejectCrit::default()),
286 proc_devices,
287 almanac.clone(),
288 )
289 .with_process_noise(process_noise);
290
291 let od_sol = odp.process_arc(initial_estimate, &arc)?;
292
293 let final_est = od_sol.estimates.last().unwrap();
294
295 println!("{final_est}");
296
297 let ric_err = traj_as_flown
298 .at(final_est.epoch())?
299 .orbit
300 .ric_difference(&final_est.orbital_state())?;
301 println!("== RIC at end ==");
302 println!("RIC Position (m): {:.3}", ric_err.radius_km * 1e3);
303 println!("RIC Velocity (m/s): {:.3}", ric_err.velocity_km_s * 1e3);
304
305 println!(
306 "Num residuals rejected: #{}",
307 od_sol.rejected_residuals().len()
308 );
309 println!(
310 "Percentage within +/-3: {}",
311 od_sol.residual_ratio_within_threshold(3.0).unwrap()
312 );
313 println!("Ratios normal? {}", od_sol.is_normal(None).unwrap());
314
315 od_sol.to_parquet(
316 "./data/04_output/04_lro_od_results.parquet",
317 ExportCfg::default(),
318 )?;
319
320 // Create the ephemeris
321 let ephem = od_sol.to_ephemeris("LRO rebuilt".to_string());
322 let ephem_start = ephem.start_epoch().unwrap();
323 let ephem_end = ephem.end_epoch().unwrap();
324 // Check that the covariance is PSD throughout the ephemeris by interpolating it.
325 for epoch in TimeSeries::inclusive(ephem_start, ephem_end, Unit::Minute * 5) {
326 ephem
327 .covar_at(
328 epoch,
329 anise::ephemerides::ephemeris::LocalFrame::RIC,
330 &almanac,
331 )
332 .unwrap_or_else(|e| panic!("covar not PSD at {epoch}: {e}"));
333 }
334 // Export as BSP!
335 ephem
336 .write_spice_bsp(-85, "./data/04_output/04_lro_rebuilt.bsp", None)
337 .expect("could not built BSP");
338 let new_almanac = Almanac::default()
339 .load("./data/04_output/04_lro_rebuilt.bsp")
340 .unwrap();
341 new_almanac.describe(None, None, None, None, None, None, None, None);
342 let (spk_start, spk_end) = new_almanac.spk_domain(-85).unwrap();
343
344 assert!((ephem_start - spk_start).abs() < Unit::Microsecond * 1);
345 assert!((ephem_end - spk_end).abs() < Unit::Microsecond * 1);
346
347 // In our case, we have the truth trajectory from NASA.
348 // So we can compute the RIC state difference between the real LRO ephem and what we've just estimated.
349 // Export the OD trajectory first.
350 let od_trajectory = od_sol.to_traj()?;
351 // Build the RIC difference.
352 od_trajectory.ric_diff_to_parquet(
353 &traj_as_flown,
354 "./data/04_output/04_lro_od_truth_error.parquet",
355 ExportCfg::default(),
356 )?;
357
358 Ok(())
359}Trait Implementations§
§impl Clone for TimeSeries
impl Clone for TimeSeries
§fn clone(&self) -> TimeSeries ⓘ
fn clone(&self) -> TimeSeries ⓘ
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for TimeSeries
impl Debug for TimeSeries
§impl Display for TimeSeries
impl Display for TimeSeries
§impl DoubleEndedIterator for TimeSeries
impl DoubleEndedIterator for TimeSeries
§fn next_back(&mut self) -> Option<Epoch>
fn next_back(&mut self) -> Option<Epoch>
Source§fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
iter_advance_by)n elements. Read more1.37.0 (const: unstable) · Source§fn nth_back(&mut self, n: usize) -> Option<Self::Item>
fn nth_back(&mut self, n: usize) -> Option<Self::Item>
nth element from the end of the iterator. Read more1.27.0 (const: unstable) · Source§fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
Iterator::try_fold(): it takes
elements starting from the back of the iterator. Read more§impl ExactSizeIterator for TimeSerieswhere
TimeSeries: Iterator,
impl ExactSizeIterator for TimeSerieswhere
TimeSeries: Iterator,
§impl<'py> IntoPyObject<'py> for TimeSeries
impl<'py> IntoPyObject<'py> for TimeSeries
§type Target = TimeSeries
type Target = TimeSeries
§type Output = Bound<'py, <TimeSeries as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <TimeSeries as IntoPyObject<'py>>::Target>
§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<TimeSeries as IntoPyObject<'py>>::Output, <TimeSeries as IntoPyObject<'py>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<TimeSeries as IntoPyObject<'py>>::Output, <TimeSeries as IntoPyObject<'py>>::Error>
§impl Iterator for TimeSeries
impl Iterator for TimeSeries
§fn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
Source§fn next_chunk<const N: usize>(
&mut self,
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
fn next_chunk<const N: usize>(
&mut self,
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
iter_next_chunk)N values. Read more1.0.0 (const: unstable) · Source§fn count(self) -> usizewhere
Self: Sized,
fn count(self) -> usizewhere
Self: Sized,
1.0.0 (const: unstable) · Source§fn last(self) -> Option<Self::Item>where
Self: Sized,
fn last(self) -> Option<Self::Item>where
Self: Sized,
Source§fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
iter_advance_by)n elements. Read more1.0.0 (const: unstable) · Source§fn nth(&mut self, n: usize) -> Option<Self::Item>
fn nth(&mut self, n: usize) -> Option<Self::Item>
nth element of the iterator. Read more1.28.0 (const: unstable) · Source§fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
1.0.0 (const: unstable) · Source§fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
1.0.0 (const: unstable) · Source§fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>where
Self: Sized,
U: IntoIterator,
fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>where
Self: Sized,
U: IntoIterator,
Source§fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
iter_intersperse)separator between items
of the original iterator. Read moreSource§fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
iter_intersperse)separator
between items of the original iterator. Read more1.0.0 (const: unstable) · Source§fn map<B, F>(self, f: F) -> Map<Self, F>
fn map<B, F>(self, f: F) -> Map<Self, F>
1.21.0 (const: unstable) · Source§fn for_each<F>(self, f: F)
fn for_each<F>(self, f: F)
1.0.0 (const: unstable) · Source§fn filter<P>(self, predicate: P) -> Filter<Self, P>
fn filter<P>(self, predicate: P) -> Filter<Self, P>
1.0.0 (const: unstable) · Source§fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
1.0.0 (const: unstable) · Source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
1.0.0 (const: unstable) · Source§fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
1.0.0 (const: unstable) · Source§fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
1.57.0 (const: unstable) · Source§fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
1.0.0 (const: unstable) · Source§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
n elements. Read more1.0.0 (const: unstable) · Source§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
n elements, or fewer
if the underlying iterator ends sooner. Read more1.0.0 (const: unstable) · Source§fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
1.0.0 (const: unstable) · Source§fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
1.29.0 (const: unstable) · Source§fn flatten(self) -> Flatten<Self>
fn flatten(self) -> Flatten<Self>
Source§fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
iter_map_windows)f for each contiguous window of size N over
self and returns an iterator over the outputs of f. Like slice::windows(),
the windows during mapping overlap as well. Read more1.0.0 (const: unstable) · Source§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
1.0.0 (const: unstable) · Source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Iterator. Read more1.0.0 (const: unstable) · Source§fn collect<B>(self) -> B
fn collect<B>(self) -> B
Source§fn try_collect<B>(
&mut self,
) -> <<Self::Item as Try>::Residual as Residual<B>>::TryType
fn try_collect<B>( &mut self, ) -> <<Self::Item as Try>::Residual as Residual<B>>::TryType
iterator_try_collect)Source§fn collect_into<E>(self, collection: &mut E) -> &mut E
fn collect_into<E>(self, collection: &mut E) -> &mut E
iter_collect_into)1.0.0 (const: unstable) · Source§fn partition<B, F>(self, f: F) -> (B, B)
fn partition<B, F>(self, f: F) -> (B, B)
Source§fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
iter_partition_in_place)true precede all those that return false.
Returns the number of true elements found. Read moreSource§fn is_partitioned<P>(self, predicate: P) -> bool
fn is_partitioned<P>(self, predicate: P) -> bool
iter_is_partitioned)true precede all those that return false. Read more1.27.0 (const: unstable) · Source§fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
1.27.0 (const: unstable) · Source§fn try_for_each<F, R>(&mut self, f: F) -> R
fn try_for_each<F, R>(&mut self, f: F) -> R
1.0.0 (const: unstable) · Source§fn fold<B, F>(self, init: B, f: F) -> B
fn fold<B, F>(self, init: B, f: F) -> B
1.51.0 (const: unstable) · Source§fn reduce<F>(self, f: F) -> Option<Self::Item>
fn reduce<F>(self, f: F) -> Option<Self::Item>
Source§fn try_reduce<R>(
&mut self,
f: impl FnMut(Self::Item, Self::Item) -> R,
) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
fn try_reduce<R>( &mut self, f: impl FnMut(Self::Item, Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
iterator_try_reduce)1.0.0 (const: unstable) · Source§fn all<F>(&mut self, f: F) -> bool
fn all<F>(&mut self, f: F) -> bool
1.0.0 (const: unstable) · Source§fn any<F>(&mut self, f: F) -> bool
fn any<F>(&mut self, f: F) -> bool
1.0.0 (const: unstable) · Source§fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
1.30.0 (const: unstable) · Source§fn find_map<B, F>(&mut self, f: F) -> Option<B>
fn find_map<B, F>(&mut self, f: F) -> Option<B>
Source§fn try_find<R>(
&mut self,
f: impl FnMut(&Self::Item) -> R,
) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
fn try_find<R>( &mut self, f: impl FnMut(&Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
try_find)1.0.0 (const: unstable) · Source§fn position<P>(&mut self, predicate: P) -> Option<usize>
fn position<P>(&mut self, predicate: P) -> Option<usize>
1.0.0 (const: unstable) · Source§fn rposition<P>(&mut self, predicate: P) -> Option<usize>
fn rposition<P>(&mut self, predicate: P) -> Option<usize>
1.0.0 (const: unstable) · Source§fn max(self) -> Option<Self::Item>
fn max(self) -> Option<Self::Item>
1.0.0 (const: unstable) · Source§fn min(self) -> Option<Self::Item>
fn min(self) -> Option<Self::Item>
1.6.0 (const: unstable) · Source§fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
1.15.0 (const: unstable) · Source§fn max_by<F>(self, compare: F) -> Option<Self::Item>
fn max_by<F>(self, compare: F) -> Option<Self::Item>
1.6.0 (const: unstable) · Source§fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
1.15.0 (const: unstable) · Source§fn min_by<F>(self, compare: F) -> Option<Self::Item>
fn min_by<F>(self, compare: F) -> Option<Self::Item>
1.0.0 (const: unstable) · Source§fn rev(self) -> Rev<Self>where
Self: Sized + DoubleEndedIterator,
fn rev(self) -> Rev<Self>where
Self: Sized + DoubleEndedIterator,
1.0.0 (const: unstable) · Source§fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
1.36.0 (const: unstable) · Source§fn copied<'a, T>(self) -> Copied<Self>
fn copied<'a, T>(self) -> Copied<Self>
1.0.0 (const: unstable) · Source§fn cycle(self) -> Cycle<Self>
fn cycle(self) -> Cycle<Self>
Source§fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>where
Self: Sized,
fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>where
Self: Sized,
iter_array_chunks)N elements of the iterator at a time. Read more1.11.0 (const: unstable) · Source§fn product<P>(self) -> P
fn product<P>(self) -> P
Source§fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
iter_order_by)Iterator with those
of another with respect to the specified comparison function. Read more1.5.0 (const: unstable) · Source§fn partial_cmp<I>(self, other: I) -> Option<Ordering>
fn partial_cmp<I>(self, other: I) -> Option<Ordering>
PartialOrd elements of
this Iterator with those of another. The comparison works like short-circuit
evaluation, returning a result without comparing the remaining elements.
As soon as an order can be determined, the evaluation stops and a result is returned. Read moreSource§fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>where
Self: Sized,
I: IntoIterator,
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,
fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>where
Self: Sized,
I: IntoIterator,
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,
iter_order_by)Iterator with those
of another with respect to the specified comparison function. Read moreSource§fn eq_by<I, F>(self, other: I, eq: F) -> bool
fn eq_by<I, F>(self, other: I, eq: F) -> bool
iter_order_by)1.5.0 (const: unstable) · Source§fn lt<I>(self, other: I) -> bool
fn lt<I>(self, other: I) -> bool
Iterator are lexicographically
less than those of another. Read more1.5.0 (const: unstable) · Source§fn le<I>(self, other: I) -> bool
fn le<I>(self, other: I) -> bool
Iterator are lexicographically
less or equal to those of another. Read more1.5.0 (const: unstable) · Source§fn gt<I>(self, other: I) -> bool
fn gt<I>(self, other: I) -> bool
Iterator are lexicographically
greater than those of another. Read more1.5.0 (const: unstable) · Source§fn ge<I>(self, other: I) -> bool
fn ge<I>(self, other: I) -> bool
Iterator are lexicographically
greater than or equal to those of another. Read more1.82.0 (const: unstable) · Source§fn is_sorted(self) -> bool
fn is_sorted(self) -> bool
1.82.0 (const: unstable) · Source§fn is_sorted_by<F>(self, compare: F) -> bool
fn is_sorted_by<F>(self, compare: F) -> bool
§impl LowerExp for TimeSeries
impl LowerExp for TimeSeries
§impl LowerHex for TimeSeries
impl LowerHex for TimeSeries
§impl Octal for TimeSeries
impl Octal for TimeSeries
§impl PartialEq for TimeSeries
impl PartialEq for TimeSeries
§impl Pointer for TimeSeries
impl Pointer for TimeSeries
§impl PyClass for TimeSeries
impl PyClass for TimeSeries
§impl PyTypeInfo for TimeSeries
impl PyTypeInfo for TimeSeries
§const NAME: &'static str = <Self as ::pyo3::PyClass>::NAME
const NAME: &'static str = <Self as ::pyo3::PyClass>::NAME
prefer using ::type_object(py).name() to get the correct runtime value
§const MODULE: Option<&'static str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
const MODULE: Option<&'static str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
prefer using ::type_object(py).module() to get the correct runtime value
§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type.§impl UpperExp for TimeSeries
impl UpperExp for TimeSeries
§impl UpperHex for TimeSeries
impl UpperHex for TimeSeries
impl DerefToPyAny for TimeSeries
impl Eq for TimeSeries
impl StructuralPartialEq for TimeSeries
Auto Trait Implementations§
impl Freeze for TimeSeries
impl RefUnwindSafe for TimeSeries
impl Send for TimeSeries
impl Sync for TimeSeries
impl Unpin for TimeSeries
impl UnsafeUnpin for TimeSeries
impl UnwindSafe for TimeSeries
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<I> IntoIterator for Iwhere
I: Iterator,
impl<I> IntoIterator for Iwhere
I: Iterator,
§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
self into an owned Python object, dropping type information and unbinding it
from the 'py lifetime.§fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
self into a Python object. Read more§impl<I> IteratorRandom for Iwhere
I: Iterator,
impl<I> IteratorRandom for Iwhere
I: Iterator,
§fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
§fn sample_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
fn sample_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
amount distinct elements into a buffer Read more§fn choose_multiple_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
fn choose_multiple_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
Renamed to sample_fill
Self::sample_fill instead§fn choose_multiple<R>(self, rng: &mut R, amount: usize) -> Vec<Self::Item>
fn choose_multiple<R>(self, rng: &mut R, amount: usize) -> Vec<Self::Item>
Renamed to sample
Self::sample insteadSource§impl<I> IteratorRandom for Iwhere
I: Iterator,
impl<I> IteratorRandom for Iwhere
I: Iterator,
Source§fn choose<R>(self, rng: &mut R) -> Option<Self::Item>
fn choose<R>(self, rng: &mut R) -> Option<Self::Item>
Source§fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
Source§impl<T> Itertools for T
impl<T> Itertools for T
Source§fn interleave<J>(
self,
other: J,
) -> Interleave<Self, <J as IntoIterator>::IntoIter>
fn interleave<J>( self, other: J, ) -> Interleave<Self, <J as IntoIterator>::IntoIter>
Source§fn interleave_shortest<J>(
self,
other: J,
) -> InterleaveShortest<Self, <J as IntoIterator>::IntoIter>
fn interleave_shortest<J>( self, other: J, ) -> InterleaveShortest<Self, <J as IntoIterator>::IntoIter>
Source§fn intersperse(
self,
element: Self::Item,
) -> IntersperseWith<Self, IntersperseElementSimple<Self::Item>>
fn intersperse( self, element: Self::Item, ) -> IntersperseWith<Self, IntersperseElementSimple<Self::Item>>
Source§fn intersperse_with<F>(self, element: F) -> IntersperseWith<Self, F>
fn intersperse_with<F>(self, element: F) -> IntersperseWith<Self, F>
Source§fn zip_longest<J>(
self,
other: J,
) -> ZipLongest<Self, <J as IntoIterator>::IntoIter>where
J: IntoIterator,
Self: Sized,
fn zip_longest<J>(
self,
other: J,
) -> ZipLongest<Self, <J as IntoIterator>::IntoIter>where
J: IntoIterator,
Self: Sized,
Source§fn zip_eq<J>(self, other: J) -> ZipEq<Self, <J as IntoIterator>::IntoIter>where
J: IntoIterator,
Self: Sized,
fn zip_eq<J>(self, other: J) -> ZipEq<Self, <J as IntoIterator>::IntoIter>where
J: IntoIterator,
Self: Sized,
Source§fn batching<B, F>(self, f: F) -> Batching<Self, F>
fn batching<B, F>(self, f: F) -> Batching<Self, F>
Source§fn group_by<K, F>(self, key: F) -> GroupBy<K, Self, F>
fn group_by<K, F>(self, key: F) -> GroupBy<K, Self, F>
Source§fn chunks(self, size: usize) -> IntoChunks<Self>where
Self: Sized,
fn chunks(self, size: usize) -> IntoChunks<Self>where
Self: Sized,
Source§fn tuple_windows<T>(self) -> TupleWindows<Self, T>where
Self: Sized + Iterator<Item = <T as TupleCollect>::Item>,
T: HomogeneousTuple,
<T as TupleCollect>::Item: Clone,
fn tuple_windows<T>(self) -> TupleWindows<Self, T>where
Self: Sized + Iterator<Item = <T as TupleCollect>::Item>,
T: HomogeneousTuple,
<T as TupleCollect>::Item: Clone,
Source§fn circular_tuple_windows<T>(self) -> CircularTupleWindows<Self, T>
fn circular_tuple_windows<T>(self) -> CircularTupleWindows<Self, T>
Source§fn tuples<T>(self) -> Tuples<Self, T>
fn tuples<T>(self) -> Tuples<Self, T>
Source§fn tee(self) -> (Tee<Self>, Tee<Self>)
fn tee(self) -> (Tee<Self>, Tee<Self>)
Source§fn step(self, n: usize) -> Step<Self>where
Self: Sized,
fn step(self, n: usize) -> Step<Self>where
Self: Sized,
Use std .step_by() instead
n elements in the base iterator
for each iteration. Read moreSource§fn map_results<F, T, U, E>(
self,
f: F,
) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
fn map_results<F, T, U, E>( self, f: F, ) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
Use .map_ok() instead
.map_ok().Source§fn map_ok<F, T, U, E>(self, f: F) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
fn map_ok<F, T, U, E>(self, f: F) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
Result::Ok value. Result::Err values are
unchanged. Read moreSource§fn filter_ok<F, T, E>(self, f: F) -> FilterOk<Self, F>
fn filter_ok<F, T, E>(self, f: F) -> FilterOk<Self, F>
Result::Ok
value with the provided closure. Result::Err values are
unchanged. Read moreSource§fn filter_map_ok<F, T, U, E>(self, f: F) -> FilterMapOk<Self, F>
fn filter_map_ok<F, T, U, E>(self, f: F) -> FilterMapOk<Self, F>
Result::Ok value with the provided closure. Result::Err
values are unchanged. Read moreSource§fn flatten_ok<T, E>(self) -> FlattenOk<Self, T, E>
fn flatten_ok<T, E>(self) -> FlattenOk<Self, T, E>
Result::Ok value into
a series of Result::Ok values. Result::Err values are unchanged. Read moreSource§fn merge<J>(
self,
other: J,
) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeLte>
fn merge<J>( self, other: J, ) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeLte>
Source§fn merge_by<J, F>(
self,
other: J,
is_first: F,
) -> MergeBy<Self, <J as IntoIterator>::IntoIter, F>
fn merge_by<J, F>( self, other: J, is_first: F, ) -> MergeBy<Self, <J as IntoIterator>::IntoIter, F>
Source§fn merge_join_by<J, F>(
self,
other: J,
cmp_fn: F,
) -> MergeJoinBy<Self, <J as IntoIterator>::IntoIter, F>
fn merge_join_by<J, F>( self, other: J, cmp_fn: F, ) -> MergeJoinBy<Self, <J as IntoIterator>::IntoIter, F>
Source§fn kmerge(self) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, KMergeByLt>
fn kmerge(self) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, KMergeByLt>
Source§fn kmerge_by<F>(
self,
first: F,
) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, F>where
Self: Sized,
Self::Item: IntoIterator,
F: FnMut(&<Self::Item as IntoIterator>::Item, &<Self::Item as IntoIterator>::Item) -> bool,
fn kmerge_by<F>(
self,
first: F,
) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, F>where
Self: Sized,
Self::Item: IntoIterator,
F: FnMut(&<Self::Item as IntoIterator>::Item, &<Self::Item as IntoIterator>::Item) -> bool,
Source§fn cartesian_product<J>(
self,
other: J,
) -> Product<Self, <J as IntoIterator>::IntoIter>
fn cartesian_product<J>( self, other: J, ) -> Product<Self, <J as IntoIterator>::IntoIter>
self and J. Read moreSource§fn multi_cartesian_product(
self,
) -> MultiProduct<<Self::Item as IntoIterator>::IntoIter>where
Self: Sized,
Self::Item: IntoIterator,
<Self::Item as IntoIterator>::IntoIter: Clone,
<Self::Item as IntoIterator>::Item: Clone,
fn multi_cartesian_product(
self,
) -> MultiProduct<<Self::Item as IntoIterator>::IntoIter>where
Self: Sized,
Self::Item: IntoIterator,
<Self::Item as IntoIterator>::IntoIter: Clone,
<Self::Item as IntoIterator>::Item: Clone,
self. Read moreSource§fn coalesce<F>(self, f: F) -> CoalesceBy<Self, F, Self::Item>
fn coalesce<F>(self, f: F) -> CoalesceBy<Self, F, Self::Item>
Source§fn dedup(self) -> CoalesceBy<Self, DedupPred2CoalescePred<DedupEq>, Self::Item>
fn dedup(self) -> CoalesceBy<Self, DedupPred2CoalescePred<DedupEq>, Self::Item>
Source§fn dedup_by<Cmp>(
self,
cmp: Cmp,
) -> CoalesceBy<Self, DedupPred2CoalescePred<Cmp>, Self::Item>
fn dedup_by<Cmp>( self, cmp: Cmp, ) -> CoalesceBy<Self, DedupPred2CoalescePred<Cmp>, Self::Item>
Source§fn dedup_with_count(
self,
) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<DedupEq>, (usize, Self::Item)>where
Self: Sized,
fn dedup_with_count(
self,
) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<DedupEq>, (usize, Self::Item)>where
Self: Sized,
Source§fn dedup_by_with_count<Cmp>(
self,
cmp: Cmp,
) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<Cmp>, (usize, Self::Item)>
fn dedup_by_with_count<Cmp>( self, cmp: Cmp, ) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<Cmp>, (usize, Self::Item)>
Source§fn duplicates(self) -> DuplicatesBy<Self, Self::Item, ById>
fn duplicates(self) -> DuplicatesBy<Self, Self::Item, ById>
Source§fn duplicates_by<V, F>(self, f: F) -> DuplicatesBy<Self, V, ByFn<F>>
fn duplicates_by<V, F>(self, f: F) -> DuplicatesBy<Self, V, ByFn<F>>
Source§fn unique(self) -> Unique<Self>
fn unique(self) -> Unique<Self>
Source§fn unique_by<V, F>(self, f: F) -> UniqueBy<Self, V, F>
fn unique_by<V, F>(self, f: F) -> UniqueBy<Self, V, F>
Source§fn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<'_, Self, F>
fn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<'_, Self, F>
accept returns true. Read moreSource§fn take_while_ref<F>(&mut self, accept: F) -> TakeWhileRef<'_, Self, F>
fn take_while_ref<F>(&mut self, accept: F) -> TakeWhileRef<'_, Self, F>
Clone-able iterator
to only pick off elements while the predicate accept returns true. Read moreSource§fn while_some<A>(self) -> WhileSome<Self>
fn while_some<A>(self) -> WhileSome<Self>
Option<A> iterator elements
and produces A. Stops on the first None encountered. Read moreSource§fn tuple_combinations<T>(self) -> TupleCombinations<Self, T>
fn tuple_combinations<T>(self) -> TupleCombinations<Self, T>
Source§fn combinations(self, k: usize) -> Combinations<Self>
fn combinations(self, k: usize) -> Combinations<Self>
k-length combinations of
the elements from an iterator. Read moreSource§fn combinations_with_replacement(
self,
k: usize,
) -> CombinationsWithReplacement<Self>
fn combinations_with_replacement( self, k: usize, ) -> CombinationsWithReplacement<Self>
k-length combinations of
the elements from an iterator, with replacement. Read moreSource§fn permutations(self, k: usize) -> Permutations<Self>
fn permutations(self, k: usize) -> Permutations<Self>
Source§fn powerset(self) -> Powerset<Self>
fn powerset(self) -> Powerset<Self>
Source§fn pad_using<F>(self, min: usize, f: F) -> PadUsing<Self, F>
fn pad_using<F>(self, min: usize, f: F) -> PadUsing<Self, F>
min by filling missing elements using a closure f. Read moreSource§fn with_position(self) -> WithPosition<Self>where
Self: Sized,
fn with_position(self) -> WithPosition<Self>where
Self: Sized,
Position to
ease special-case handling of the first or last elements. Read moreSource§fn positions<P>(self, predicate: P) -> Positions<Self, P>
fn positions<P>(self, predicate: P) -> Positions<Self, P>
Source§fn update<F>(self, updater: F) -> Update<Self, F>
fn update<F>(self, updater: F) -> Update<Self, F>
Source§fn next_tuple<T>(&mut self) -> Option<T>
fn next_tuple<T>(&mut self) -> Option<T>
Source§fn collect_tuple<T>(self) -> Option<T>
fn collect_tuple<T>(self) -> Option<T>
Source§fn find_position<P>(&mut self, pred: P) -> Option<(usize, Self::Item)>
fn find_position<P>(&mut self, pred: P) -> Option<(usize, Self::Item)>
Source§fn find_or_last<P>(self, predicate: P) -> Option<Self::Item>
fn find_or_last<P>(self, predicate: P) -> Option<Self::Item>
Source§fn find_or_first<P>(self, predicate: P) -> Option<Self::Item>
fn find_or_first<P>(self, predicate: P) -> Option<Self::Item>
Source§fn contains<Q>(&mut self, query: &Q) -> bool
fn contains<Q>(&mut self, query: &Q) -> bool
true if the given item is present in this iterator. Read moreSource§fn all_unique(&mut self) -> bool
fn all_unique(&mut self) -> bool
Source§fn dropping(self, n: usize) -> Selfwhere
Self: Sized,
fn dropping(self, n: usize) -> Selfwhere
Self: Sized,
n elements from the iterator eagerly,
and return the same iterator again. Read moreSource§fn dropping_back(self, n: usize) -> Selfwhere
Self: Sized + DoubleEndedIterator,
fn dropping_back(self, n: usize) -> Selfwhere
Self: Sized + DoubleEndedIterator,
n elements from the iterator eagerly,
and return the same iterator again. Read moreSource§fn foreach<F>(self, f: F)
fn foreach<F>(self, f: F)
Use .for_each() instead
f eagerly on each element of the iterator. Read moreSource§fn collect_vec(self) -> Vec<Self::Item>where
Self: Sized,
fn collect_vec(self) -> Vec<Self::Item>where
Self: Sized,
.collect_vec() is simply a type specialization of Iterator::collect,
for convenience.Source§fn try_collect<T, U, E>(self) -> Result<U, E>
fn try_collect<T, U, E>(self) -> Result<U, E>
Source§fn set_from<'a, A, J>(&mut self, from: J) -> usize
fn set_from<'a, A, J>(&mut self, from: J) -> usize
self from the from iterator,
stopping at the shortest of the two iterators. Read moreSource§fn join(&mut self, sep: &str) -> String
fn join(&mut self, sep: &str) -> String
sep. Read moreSource§fn format(self, sep: &str) -> Format<'_, Self>where
Self: Sized,
fn format(self, sep: &str) -> Format<'_, Self>where
Self: Sized,
sep. Read moreSource§fn format_with<F>(self, sep: &str, format: F) -> FormatWith<'_, Self, F>
fn format_with<F>(self, sep: &str, format: F) -> FormatWith<'_, Self, F>
sep. Read moreSource§fn fold_results<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
fn fold_results<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
Use .fold_ok() instead
.fold_ok().Source§fn fold_ok<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
fn fold_ok<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
Result values from an iterator. Read moreSource§fn fold_options<A, B, F>(&mut self, start: B, f: F) -> Option<B>
fn fold_options<A, B, F>(&mut self, start: B, f: F) -> Option<B>
Option values from an iterator. Read moreSource§fn fold1<F>(self, f: F) -> Option<Self::Item>
fn fold1<F>(self, f: F) -> Option<Self::Item>
Use Iterator::reduce instead
Source§fn tree_fold1<F>(self, f: F) -> Option<Self::Item>
fn tree_fold1<F>(self, f: F) -> Option<Self::Item>
Source§fn fold_while<B, F>(&mut self, init: B, f: F) -> FoldWhile<B>
fn fold_while<B, F>(&mut self, init: B, f: F) -> FoldWhile<B>
Source§fn sum1<S>(self) -> Option<S>
fn sum1<S>(self) -> Option<S>
Source§fn product1<P>(self) -> Option<P>
fn product1<P>(self) -> Option<P>
Source§fn sorted_unstable(self) -> IntoIter<Self::Item>
fn sorted_unstable(self) -> IntoIter<Self::Item>
Source§fn sorted_unstable_by<F>(self, cmp: F) -> IntoIter<Self::Item>
fn sorted_unstable_by<F>(self, cmp: F) -> IntoIter<Self::Item>
Source§fn sorted_unstable_by_key<K, F>(self, f: F) -> IntoIter<Self::Item>
fn sorted_unstable_by_key<K, F>(self, f: F) -> IntoIter<Self::Item>
Source§fn sorted(self) -> IntoIter<Self::Item>
fn sorted(self) -> IntoIter<Self::Item>
Source§fn sorted_by<F>(self, cmp: F) -> IntoIter<Self::Item>
fn sorted_by<F>(self, cmp: F) -> IntoIter<Self::Item>
Source§fn sorted_by_key<K, F>(self, f: F) -> IntoIter<Self::Item>
fn sorted_by_key<K, F>(self, f: F) -> IntoIter<Self::Item>
Source§fn sorted_by_cached_key<K, F>(self, f: F) -> IntoIter<Self::Item>
fn sorted_by_cached_key<K, F>(self, f: F) -> IntoIter<Self::Item>
Source§fn k_smallest(self, k: usize) -> IntoIter<Self::Item>
fn k_smallest(self, k: usize) -> IntoIter<Self::Item>
Source§fn partition_map<A, B, F, L, R>(self, predicate: F) -> (A, B)
fn partition_map<A, B, F, L, R>(self, predicate: F) -> (A, B)
Iterator::partition, each partition may
have a distinct type. Read moreSource§fn partition_result<A, B, T, E>(self) -> (A, B)
fn partition_result<A, B, T, E>(self) -> (A, B)
Results into one list of all the Ok elements
and another list of all the Err elements. Read moreSource§fn into_group_map<K, V>(self) -> HashMap<K, Vec<V>>
fn into_group_map<K, V>(self) -> HashMap<K, Vec<V>>
HashMap of keys mapped to Vecs of values. Keys and values
are taken from (Key, Value) tuple pairs yielded by the input iterator. Read moreSource§fn into_group_map_by<K, V, F>(self, f: F) -> HashMap<K, Vec<V>>
fn into_group_map_by<K, V, F>(self, f: F) -> HashMap<K, Vec<V>>
Iterator on a HashMap. Keys mapped to Vecs of values. The key is specified
in the closure. Read moreSource§fn into_grouping_map<K, V>(self) -> GroupingMap<Self>
fn into_grouping_map<K, V>(self) -> GroupingMap<Self>
GroupingMap to be used later with one of the efficient
group-and-fold operations it allows to perform. Read moreSource§fn into_grouping_map_by<K, V, F>(
self,
key_mapper: F,
) -> GroupingMap<MapForGrouping<Self, F>>
fn into_grouping_map_by<K, V, F>( self, key_mapper: F, ) -> GroupingMap<MapForGrouping<Self, F>>
GroupingMap to be used later with one of the efficient
group-and-fold operations it allows to perform. Read moreSource§fn min_set_by<F>(self, compare: F) -> Vec<Self::Item>
fn min_set_by<F>(self, compare: F) -> Vec<Self::Item>
Source§fn min_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
fn min_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
Source§fn max_set_by<F>(self, compare: F) -> Vec<Self::Item>
fn max_set_by<F>(self, compare: F) -> Vec<Self::Item>
Source§fn max_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
fn max_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
Source§fn minmax(self) -> MinMaxResult<Self::Item>
fn minmax(self) -> MinMaxResult<Self::Item>
Source§fn minmax_by_key<K, F>(self, key: F) -> MinMaxResult<Self::Item>
fn minmax_by_key<K, F>(self, key: F) -> MinMaxResult<Self::Item>
Source§fn minmax_by<F>(self, compare: F) -> MinMaxResult<Self::Item>
fn minmax_by<F>(self, compare: F) -> MinMaxResult<Self::Item>
Source§fn position_max(self) -> Option<usize>
fn position_max(self) -> Option<usize>
Source§fn position_max_by_key<K, F>(self, key: F) -> Option<usize>
fn position_max_by_key<K, F>(self, key: F) -> Option<usize>
Source§fn position_max_by<F>(self, compare: F) -> Option<usize>
fn position_max_by<F>(self, compare: F) -> Option<usize>
Source§fn position_min(self) -> Option<usize>
fn position_min(self) -> Option<usize>
Source§fn position_min_by_key<K, F>(self, key: F) -> Option<usize>
fn position_min_by_key<K, F>(self, key: F) -> Option<usize>
Source§fn position_min_by<F>(self, compare: F) -> Option<usize>
fn position_min_by<F>(self, compare: F) -> Option<usize>
Source§fn position_minmax(self) -> MinMaxResult<usize>
fn position_minmax(self) -> MinMaxResult<usize>
Source§fn position_minmax_by_key<K, F>(self, key: F) -> MinMaxResult<usize>
fn position_minmax_by_key<K, F>(self, key: F) -> MinMaxResult<usize>
Source§fn position_minmax_by<F>(self, compare: F) -> MinMaxResult<usize>
fn position_minmax_by<F>(self, compare: F) -> MinMaxResult<usize>
Source§fn exactly_one(self) -> Result<Self::Item, ExactlyOneError<Self>>where
Self: Sized,
fn exactly_one(self) -> Result<Self::Item, ExactlyOneError<Self>>where
Self: Sized,
Source§fn at_most_one(self) -> Result<Option<Self::Item>, ExactlyOneError<Self>>where
Self: Sized,
fn at_most_one(self) -> Result<Option<Self::Item>, ExactlyOneError<Self>>where
Self: Sized,
Source§fn multipeek(self) -> MultiPeek<Self>where
Self: Sized,
fn multipeek(self) -> MultiPeek<Self>where
Self: Sized,
.next()
values without advancing the base iterator. Read moreSource§fn counts(self) -> HashMap<Self::Item, usize>
fn counts(self) -> HashMap<Self::Item, usize>
HashMap which
contains each item that appears in the iterator and the number
of times it appears. Read moreSource§fn counts_by<K, F>(self, f: F) -> HashMap<K, usize>
fn counts_by<K, F>(self, f: F) -> HashMap<K, usize>
HashMap which
contains each item that appears in the iterator and the number
of times it appears,
determining identity using a keying function. Read moreSource§fn multiunzip<FromI>(self) -> FromIwhere
Self: Sized + MultiUnzip<FromI>,
fn multiunzip<FromI>(self) -> FromIwhere
Self: Sized + MultiUnzip<FromI>,
§impl<T> ParallelBridge for T
impl<T> ParallelBridge for T
§fn par_bridge(self) -> IterBridge<T>
fn par_bridge(self) -> IterBridge<T>
ParallelIterator.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<S, T> ProgressIterator for Twhere
T: Iterator<Item = S>,
impl<S, T> ProgressIterator for Twhere
T: Iterator<Item = S>,
§fn progress_with(self, progress: ProgressBar) -> ProgressBarIter<T>
fn progress_with(self, progress: ProgressBar) -> ProgressBarIter<T>
§fn try_progress(self) -> Option<ProgressBarIter<Self>>
fn try_progress(self) -> Option<ProgressBarIter<Self>>
Iterator::size_hint() to get length.
Returns Some(..) only if size_hint.1 is Some. If you want to create a progress bar
even if size_hint.1 returns None use progress_count()
or progress_with() instead.§fn progress(self) -> ProgressBarIter<Self>where
Self: ExactSizeIterator,
fn progress(self) -> ProgressBarIter<Self>where
Self: ExactSizeIterator,
§fn progress_count(self, len: u64) -> ProgressBarIter<Self>
fn progress_count(self, len: u64) -> ProgressBarIter<Self>
§fn progress_with_style(self, style: ProgressStyle) -> ProgressBarIter<Self>where
Self: ExactSizeIterator,
fn progress_with_style(self, style: ProgressStyle) -> ProgressBarIter<Self>where
Self: ExactSizeIterator,
§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
§const NAME: &'static str = T::NAME
const NAME: &'static str = T::NAME
Use ::classinfo_object() instead and format the type name at runtime. Note that using built-in cast features is often better than manual PyTypeCheck usage.
§fn type_check(object: &Bound<'_, PyAny>) -> bool
fn type_check(object: &Bound<'_, PyAny>) -> bool
§fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
isinstance and issubclass function. Read more§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.