pub fn error_to_string<S>(value: &Option<AppError>, serializer: S) -> Result<S::Ok, S::Error>
where
    S: Serializer,
{
    if value.is_none() {
        "None".to_string().serialize(serializer)
    } else {
        format!("{}", value.as_ref().unwrap()).serialize(serializer)
    }
}
/// Converts the error to string.
Converts the error to string.
Converts the error to string .
pub fn error_to_string<S>(value: &Option<AppError>, serializer: S) -> Result<S::Ok, S::Error>
where
    S: Serializer,
{
    if value.is_none() {
        "None".to_string().serialize(serializer)
    } else {
        format!("{}", value.as_ref().unwrap()).serialize(serializer)
    }
}
pub fn error_to_string < S > ( value : & Option < AppError > , serializer : S ) -> Result < S :: Ok , S :: Error > where S : Serializer , { if value . is_none ( ) { " " . to_string ( ) . serialize ( serializer ) } else { format ! ( " " value as_ref ( ) unwrap ( ) ) . serialize ( serializer ) } }
Converts the error to string.
Converts the error to string .
value
&Option<AppError>
serializer
S
value
&Option<AppError>
serializer
S