pub struct Profile<'a> { /* private fields */ }Expand description
Single-value profile with a 60-second reception and optional 60-second reporting period.
Implementations§
Source§impl<'a> Profile<'a>
impl<'a> Profile<'a>
Sourcepub fn new(
id: &'a str,
channel: Channel<'a>,
first_utc: i64,
periodic: bool,
threshold_w: Option<i64>,
) -> Result<Profile<'a>, Error>
pub fn new( id: &'a str, channel: Channel<'a>, first_utc: i64, periodic: bool, threshold_w: Option<i64>, ) -> Result<Profile<'a>, Error>
Commission the first sample instant, periodic reporting and an optional threshold in the same signed watts as the meter. The first valid sample sets the baseline. A crossing occurs when a later sample moves strictly above or below the threshold from the other side or from equality.
Auto Trait Implementations§
impl<'a> Freeze for Profile<'a>
impl<'a> RefUnwindSafe for Profile<'a>
impl<'a> Send for Profile<'a>
impl<'a> Sync for Profile<'a>
impl<'a> Unpin for Profile<'a>
impl<'a> UnsafeUnpin for Profile<'a>
impl<'a> UnwindSafe for Profile<'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