Struct Sources
pub struct Sources<'a>(Vec<Source<'a>>);Expand description
A source mapping defines how multiple sources are transformed and combined into a single measurement stream.
When built, it produces a list of source-transform pairs. If the caller receives a measurement from source “X”, they should then apply the transform associated with “X” to the measurement.
Tuple Fields§
§0: Vec<Source<'a>>Implementations§
§impl<'a> Sources<'a>
impl<'a> Sources<'a>
pub fn new_direct(source: Cow<'a, str>) -> Self
pub fn build(
self,
legend: &mut Legend,
) -> Result<Vec<(Cow<'a, str>, Transform)>>
pub fn build( self, legend: &mut Legend, ) -> Result<Vec<(Cow<'a, str>, Transform)>>
Builds the source mapping into a list of source-transform pairs.
See the type-level documentation for more details.
pub fn build_mut(
self,
legend: &mut Legend,
) -> Result<Vec<(Cow<'a, str>, TransformMut)>>
pub fn build_mut( self, legend: &mut Legend, ) -> Result<Vec<(Cow<'a, str>, TransformMut)>>
Builds the source mapping into a list of source-transform pairs.
Unlike build, this results in mutable transforms, which
can apply stateful transformations to the measurements.
See the type-level documentation for more details.
Trait Implementations§
§impl<'de: 'a, 'a> Deserialize<'de> for Sources<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Sources<'a>
§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
Auto Trait Implementations§
impl<'a> Freeze for Sources<'a>
impl<'a> RefUnwindSafe for Sources<'a>
impl<'a> Send for Sources<'a>
impl<'a> Sync for Sources<'a>
impl<'a> Unpin for Sources<'a>
impl<'a> UnwindSafe for Sources<'a>
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