pub struct EffectsConfig {
pub http: bool,
pub smtp: bool,
pub smtp_parts: bool,
pub env: BTreeMap<String, String>,
pub http_responses: Vec<HttpResponseRule>,
pub db_reset: Option<String>,
pub db_dump: Option<String>,
pub named_kinds: bool,
}Fields§
§http: bool§smtp: bool§smtp_parts: boolMail is recorded as decoded headers and MIME parts. Configs saved before it existed leave it out and keep recording the raw DATA, so their cases still replay.
env: BTreeMap<String, String>§http_responses: Vec<HttpResponseRule>Canned responses for the HTTP effect sink, matched in order; unmatched requests get 200 {}.
db_reset: Option<String>§db_dump: Option<String>§named_kinds: boolWhether --effects named the kinds. --effect-env turns a sink on too, but that is inferred
from a variable, not a request to replace the saved kinds.
Implementations§
Source§impl EffectsConfig
impl EffectsConfig
pub fn is_empty(&self) -> bool
pub fn serial(&self) -> bool
pub fn from_args( kinds: &[String], env: &[String], db_reset: Option<&str>, db_dump: Option<&str>, ) -> Result<Option<Self>>
pub fn from_args_with_responses( kinds: &[String], env: &[String], responses: &[String], repo: &Path, db_reset: Option<&str>, db_dump: Option<&str>, ) -> Result<Option<Self>>
Trait Implementations§
Source§impl Clone for EffectsConfig
impl Clone for EffectsConfig
Source§impl Debug for EffectsConfig
impl Debug for EffectsConfig
Source§impl Default for EffectsConfig
impl Default for EffectsConfig
Source§impl<'de> Deserialize<'de> for EffectsConfig
impl<'de> Deserialize<'de> for EffectsConfig
Source§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
Source§impl PartialEq for EffectsConfig
Two configs are equal when they save the same effects: named_kinds records how this run was
called, not what is kept, and it is not serialized.
impl PartialEq for EffectsConfig
Two configs are equal when they save the same effects: named_kinds records how this run was
called, not what is kept, and it is not serialized.
Auto Trait Implementations§
impl Forget for EffectsConfig
impl Freeze for EffectsConfig
impl Move for EffectsConfig
impl RefUnwindSafe for EffectsConfig
impl Send for EffectsConfig
impl Sync for EffectsConfig
impl Unpin for EffectsConfig
impl UnsafeUnpin for EffectsConfig
impl UnwindSafe for EffectsConfig
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