pub struct ExpectDef {
pub status: Option<StatusExpect>,
pub headers: HashMap<String, String>,
pub body_contains: Vec<String>,
pub body_not_contains: Vec<String>,
pub body_matches: Vec<String>,
pub body_not_matches: Vec<String>,
}Expand description
期待値定義。
Fields§
§status: Option<StatusExpect>期待HTTPステータスコード。単一 or 複数。
headers: HashMap<String, String>ヘッダー検証。キーはcase-insensitive、値は部分一致。
body_contains: Vec<String>ボディに含まれるべき文字列。
body_not_contains: Vec<String>ボディに含まれてはいけない文字列。
body_matches: Vec<String>ボディがマッチすべき正規表現(Rust regex構文)。ボディ全体に対して検索 (is_match) する。
body_not_matches: Vec<String>ボディがマッチしてはいけない正規表現(Rust regex構文)。ボディ全体に対して検索 (is_match) する。
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ExpectDef
impl<'de> Deserialize<'de> for ExpectDef
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 JsonSchema for ExpectDef
impl JsonSchema for ExpectDef
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ExpectDef
impl RefUnwindSafe for ExpectDef
impl Send for ExpectDef
impl Sync for ExpectDef
impl Unpin for ExpectDef
impl UnsafeUnpin for ExpectDef
impl UnwindSafe for ExpectDef
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