pub struct TestBackend { /* private fields */ }Expand description
Test backend that returns predefined answers
Implementations§
Source§impl TestBackend
impl TestBackend
pub fn new() -> Self
pub fn with_string( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn with_int(self, key: impl Into<String>, value: i64) -> Self
pub fn with_float(self, key: impl Into<String>, value: f64) -> Self
pub fn with_bool(self, key: impl Into<String>, value: bool) -> Self
Trait Implementations§
Source§impl Debug for TestBackend
impl Debug for TestBackend
Source§impl Default for TestBackend
impl Default for TestBackend
Source§fn default() -> TestBackend
fn default() -> TestBackend
Returns the “default value” for a type. Read more
Source§impl InterviewBackend for TestBackend
impl InterviewBackend for TestBackend
Source§fn execute(&self, _interview: &Interview) -> Result<Answers, BackendError>
fn execute(&self, _interview: &Interview) -> Result<Answers, BackendError>
Execute an interview and return the collected answers
Source§fn execute_section(&self, section: &Section) -> Result<Answers, BackendError>
fn execute_section(&self, section: &Section) -> Result<Answers, BackendError>
Execute a single section (optional, has default implementation)
Auto Trait Implementations§
impl Freeze for TestBackend
impl RefUnwindSafe for TestBackend
impl Send for TestBackend
impl Sync for TestBackend
impl Unpin for TestBackend
impl UnwindSafe for TestBackend
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