[−][src]Struct svc_agent::mqtt::LongTermTimingProperties
Timing properties that persist through a message chain.
See OutgoingShortTermTimingProperties for more explanation on timings.
There are two kinds of properties: regular an cumulative. Regular properties just get proxied without change to the next message in the chain. Cumulative properties sum corresponding values from OutgoingShortTermTimingProperties.
If you use methods like to_response, to_request, to_event and similar then you shouldn't think about long term timings since they already take care of all these things.
Implementations
impl LongTermTimingProperties
[src]
pub fn update_cumulative_timings(
self,
short_timing: &OutgoingShortTermTimingProperties
) -> Self
[src]
self,
short_timing: &OutgoingShortTermTimingProperties
) -> Self
Updates cumulative values with the given OutgoingShortTermTimingProperties values.
Prefer using to_response and similar methods for building responses. If you by any chance can't use them but still want to pass LongTermTimingProperties manually then this is the method to call to keep timings consistent.
Arguments
short_timing
– a reference to OutgoingShortTermTimingProperties object with values to increase long term timings with.
Example
let short_term_timing = OutgoingShortTermTimingProperties::until_now(start_timestamp); let long_term_timing = response .properties() .long_term_timing() .clone() .update_cumulative_timings(&short_term_timing); let props = OutgoingResponseProperties::new( response.properties().status(), request.correlation_data(), long_term_timing, short_term_timing, response.properties().tracking().clone(), ); let message = OutgoingResponse::unicast( response.payload().to_owned(), props, request.properties(), "v1" );
Trait Implementations
impl Clone for LongTermTimingProperties
[src]
fn clone(&self) -> LongTermTimingProperties
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for LongTermTimingProperties
[src]
impl<'de> Deserialize<'de> for LongTermTimingProperties
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for LongTermTimingProperties
[src]
Auto Trait Implementations
impl RefUnwindSafe for LongTermTimingProperties
impl Send for LongTermTimingProperties
impl Sync for LongTermTimingProperties
impl Unpin for LongTermTimingProperties
impl UnwindSafe for LongTermTimingProperties
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,