pub fn deserialize_from_str<'de, D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        let s: Cow<'de, str> = Cow::deserialize(d)?;
        Self::from_str(&s).map_err(|_| {
            D::Error::invalid_value(Unexpected::Str(&s), &r#""plain", "wall" or "swamp""#)
        })
    }
/// Helper function for deserializing from a string rather than from an
/// integer.
Helper function for deserializing from a string rather than from an
integer.
Helper function for deserializing from a string rather than from an integer .
pub fn deserialize_from_str<'de, D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        let s: Cow<'de, str> = Cow::deserialize(d)?;
        Self::from_str(&s).map_err(|_| {
            D::Error::invalid_value(Unexpected::Str(&s), &r#""plain", "wall" or "swamp""#)
        })
    }
pub fn deserialize_from_str < ' de , D : Deserializer < ' de > > ( d : D ) -> Result < Self , D :: Error > { let s : Cow < ' de , str > = Cow :: deserialize ( d ) ? ; Self :: from_str ( & s ) . map_err ( | _ | { D :: Error :: invalid_value ( Unexpected :: Str ( & s ) , & r#""plain", "wall" or "swamp""# ) } ) }
Helper function for deserializing from a string rather than from an
integer.
Helper function for deserializing from a string rather than from an integer .
d
D