Answers for "rust from impl"

1

rust impl display

impl fmt::Display for SomeStruct {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.0)
    }
}
Posted by: Guest on May-04-2021

Browse Popular Code Answers by Language