pub trait ServiceConnector {
// Required methods
fn get_input(
&self,
day: Day,
year: Year,
session: &str,
) -> Result<String, ServiceError>;
fn submit_answer(
&self,
answer: &Answer,
part: Part,
day: Day,
year: Year,
session: &str,
) -> Result<String, ServiceError>;
}Expand description
Abstraction of the communication protocol used to communicate with the Advent of Code backend web service enabling test mocks.
Required Methods§
fn get_input( &self, day: Day, year: Year, session: &str, ) -> Result<String, ServiceError>
fn submit_answer( &self, answer: &Answer, part: Part, day: Day, year: Year, session: &str, ) -> Result<String, ServiceError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".