crate::ix!();
#[derive(Default)]
pub struct ValidationState<R> {
mode: validation_state::ModeState, result: R,
reject_reason: String,
debug_message: String,
}
pub mod validation_state {
pub enum ModeState {
M_VALID,
M_INVALID,
M_ERROR,
}
impl Default for ModeState {
fn default() -> Self {
ModeState::M_VALID
}
}
}
impl<R> ValidationState<R> {
pub fn invalid(&mut self,
result: R,
reject_reason: Option<&str>,
debug_message: Option<&str>) -> bool {
let reject_reason: &str = reject_reason.unwrap_or("");
let debug_message: &str = debug_message.unwrap_or("");
todo!();
}
pub fn error(&mut self, reject_reason: &String) -> bool {
todo!();
}
pub fn is_valid(&self) -> bool {
todo!();
}
pub fn is_invalid(&self) -> bool {
todo!();
}
pub fn is_error(&self) -> bool {
todo!();
}
pub fn get_result(&self) -> R {
todo!();
}
pub fn get_reject_reason(&self) -> String {
todo!();
}
pub fn get_debug_message(&self) -> String {
todo!();
}
pub fn to_string(&self) -> String {
todo!();
}
}