Skip to main content

AssertReply

Trait AssertReply 

Source
pub trait AssertReply: Sized {
    // Required methods
    fn is_positive_completion(&self) -> bool;
    fn assert_positive_completion(self) -> Result<()>;
    fn assert_severity(self, severity: Severity) -> Result<()>;
    fn assert_code(self, code: u16) -> Result<()>;
}

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AssertReply for Response<String>

Source§

fn is_positive_completion(&self) -> bool

Returns true if the reply is a positive completion.

Source§

fn assert_severity(self, severity: Severity) -> Result<()>

Returns Ok if the reply has the specified severity.

Source§

fn assert_positive_completion(self) -> Result<()>

Returns Ok if the reply returned a 2xx code.

Source§

fn assert_code(self, code: u16) -> Result<()>

Returns Ok if the reply has the specified status code.

Implementors§