[−][src]Struct thesis::experiment::Experiment
An individual experiment. See crate-level documentation for an example on how to use
Implementations
impl<T> Experiment<T, (), (), (), Box<dyn FnOnce(Mismatch<T>) -> T>> where
T: PartialEq,
[src]
T: PartialEq,
pub fn new(name: &'static str) -> Self
[src]
Create a new experiment. The only provided default is accepting the
control value in the mismatch handler. All other builder-style functions
must be called before run
can be called.
impl<T, C, E, R, M> Experiment<T, C, E, R, M>
[src]
pub fn control<NC>(
self,
control_builder: NC
) -> Experiment<T, Instrumented<NC>, E, R, M> where
NC: Future<Output = T>,
[src]
self,
control_builder: NC
) -> Experiment<T, Instrumented<NC>, E, R, M> where
NC: Future<Output = T>,
Use the future given here as the control, or the existing method for calculating a value
pub fn experimental<NE>(
self,
experimental_builder: NE
) -> Experiment<T, C, Instrumented<NE>, R, M> where
NE: Future<Output = T>,
[src]
self,
experimental_builder: NE
) -> Experiment<T, C, Instrumented<NE>, R, M> where
NE: Future<Output = T>,
Use the future given here as the experimental, or the new method for calculating a value
pub fn rollout_strategy<NR>(
self,
rollout_strategy: NR
) -> Experiment<T, C, E, NR, M>
[src]
self,
rollout_strategy: NR
) -> Experiment<T, C, E, NR, M>
Use the given strategy for rolling out the new code
pub fn on_mismatch<NM>(self, on_mismatch: NM) -> Experiment<T, C, E, R, NM> where
NM: FnOnce(Mismatch<T>) -> T,
[src]
NM: FnOnce(Mismatch<T>) -> T,
Call this function when running the experiment results in a different
value from the control and experimental methods. This can only happen
when the rollout strategy returns
RolloutDecision::UseExperimentalAndCompare
.
pub async fn run(self) -> T where
T: PartialEq,
R: RolloutStrategy,
M: FnOnce(Mismatch<T>) -> T,
C: Future<Output = T>,
E: Future<Output = T>,
[src]
T: PartialEq,
R: RolloutStrategy,
M: FnOnce(Mismatch<T>) -> T,
C: Future<Output = T>,
E: Future<Output = T>,
Run the experiment with the parameters provided
Auto Trait Implementations
impl<T, C, E, R, M> RefUnwindSafe for Experiment<T, C, E, R, M> where
C: RefUnwindSafe,
E: RefUnwindSafe,
M: RefUnwindSafe,
R: RefUnwindSafe,
T: RefUnwindSafe,
C: RefUnwindSafe,
E: RefUnwindSafe,
M: RefUnwindSafe,
R: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, C, E, R, M> Send for Experiment<T, C, E, R, M> where
C: Send,
E: Send,
M: Send,
R: Send,
T: Send,
C: Send,
E: Send,
M: Send,
R: Send,
T: Send,
impl<T, C, E, R, M> Sync for Experiment<T, C, E, R, M> where
C: Sync,
E: Sync,
M: Sync,
R: Sync,
T: Sync,
C: Sync,
E: Sync,
M: Sync,
R: Sync,
T: Sync,
impl<T, C, E, R, M> Unpin for Experiment<T, C, E, R, M> where
C: Unpin,
E: Unpin,
M: Unpin,
R: Unpin,
T: Unpin,
C: Unpin,
E: Unpin,
M: Unpin,
R: Unpin,
T: Unpin,
impl<T, C, E, R, M> UnwindSafe for Experiment<T, C, E, R, M> where
C: UnwindSafe,
E: UnwindSafe,
M: UnwindSafe,
R: UnwindSafe,
T: UnwindSafe,
C: UnwindSafe,
E: UnwindSafe,
M: UnwindSafe,
R: UnwindSafe,
T: UnwindSafe,
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
pub 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.
pub 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>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,