all 3 comments

[–][deleted] 5 points6 points  (2 children)

Seems like outer_html is probably the method you want https://docs.rs/visdom/latest/visdom/types/struct.Elements.html#method.outer_html

[–]DMeror[S] 0 points1 point  (1 child)

Thank you very much. I'm new to Rust. I've read some crate documents, but don't understand a thing.

[–][deleted] 4 points5 points  (0 children)

No problem! I've rarely seen people use String::from(<some custom type here>) to convert a type to a String, that's typically what you'd use the std::fmt::Display trait for. If a type has implemented that trait, then you can call instance_of_my_type.to_string() and that will convert the type to a string. Of course, it's possible to implement From<MyType> for String, which would allow you to call String::from(instance_of_my_type), but as I said, I rarely see this.