docs(core): add documentation for all public API members

This commit is contained in:
Anand Balakrishnan 2023-05-05 14:33:19 -07:00
parent ee75539d73
commit 299e572186
No known key found for this signature in database
9 changed files with 325 additions and 48 deletions

View file

@ -1,12 +1,22 @@
//! Signal iterator.
use std::iter::{zip, Zip};
use std::time::Duration;
use super::Signal;
/// An iterator over a [`Signal`].
///
/// This takes into account if the signal is iterable or not, i.e., it produces samples
/// only for [`Signal::Sampled`] and empty iterators for [`Signal::Empty`] (as it
/// contains no values) and [`Signal::Constant`] (as there is no well defined start and
/// end to the signal).
#[derive(Debug, Default)]
pub enum Iter<'a, T> {
#[doc(hidden)]
#[default]
Empty,
#[doc(hidden)]
Iter(Zip<core::slice::Iter<'a, Duration>, core::slice::Iter<'a, T>>),
}