is there a way to inpect the traits an object provides at runtime. Similar to pythons dir()? I wish to inspect the contents of a core::str::StrSplits<'_>
and would like to be able to view the traits it implements.
inspect rust traits at runtime
572 views Asked by ragingSloth At
1
There is no facility for doing this at runtime; at compile time, however, there is, and this is what rustdoc does.
With that you can see things like the
core::str::StrSplits
documentation which covers the information you requested.