Struct TariffRead
pub struct TariffRead<'a> { /* private fields */ }Expand description
A transport-independent FSCH read. Dropping it discards the unfinished schedule.
Implementations§
§impl<'a> TariffRead<'a>
impl<'a> TariffRead<'a>
pub fn new(
node: &'a str,
profile: TariffProfile<'a>,
window: Range<u32>,
) -> Result<TariffRead<'a>, Error>
pub fn new( node: &'a str, profile: TariffProfile<'a>, window: Range<u32>, ) -> Result<TariffRead<'a>, Error>
Begin a read for the provider’s 23–25 hour delivery day.
pub fn with_batch_limit(self, limit: usize) -> TariffRead<'a>
pub fn with_batch_limit(self, limit: usize) -> TariffRead<'a>
Cap the number of fields per MMS Read. A zero limit permits a single field.
pub fn fields(&self) -> Vec<(String, Fc)>
pub fn fields(&self) -> Vec<(String, Fc)>
Ordered fields for the next MMS Read. Supply its outcome to Self::accept.
pub fn accept(
self,
response: Result<Vec<Value>, Error>,
) -> Result<ControlFlow<TariffSchedule, TariffRead<'a>>, Error>
pub fn accept( self, response: Result<Vec<Value>, Error>, ) -> Result<ControlFlow<TariffSchedule, TariffRead<'a>>, Error>
Supply the outcome of one request in field order. A local peer max PDU error
before transmission retries a smaller batch. Only the closing header completes the read.
Auto Trait Implementations§
impl<'a> Freeze for TariffRead<'a>
impl<'a> RefUnwindSafe for TariffRead<'a>
impl<'a> Send for TariffRead<'a>
impl<'a> Sync for TariffRead<'a>
impl<'a> Unpin for TariffRead<'a>
impl<'a> UnsafeUnpin for TariffRead<'a>
impl<'a> UnwindSafe for TariffRead<'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