and doesn't seem to have a 'send' method in its implemented traits (docs.rs/tokio-serde/latest/tokio_serde/struct.Framed.html#trait-implementations)
I guess I'm missing something basic or slightly less basic. I've written a small amount of Rust but have limited experience with in-depth libraries and navigating around these things.
Thanks in advance! Sorry I can only put two links in a post as a new member.
Yeah, this is an annoying example.
The send method comes from the futures-util crate, in the SinkExt trait. I am guessing it is re-exported in the futures crate's prelude. There is a implementation of SinkExt for any type that implements Sink. And Framed implements Sink.
Such transitive impls don't show up in docs. I dug it up with rust-analyzer.
futures_util crate reexports the futures_sink::Sink trait in futures_util::sink mod and defines a subtrait SinkExt as well as a blanket impl to have all types implemented with Sink also implements SinkExt there
Finally futures crate reexportsSink and SinkExt in futures::prelude which is imported by the end user
tokio-serde only needs futures_sink::Sink trait for Framed, and the user can gain extra functionality (like send method) from SinkExt trait through futures_util or futures crate.
Foreign traits are only usable if they are explicitly imported, so if you can't find the method in the inherent impl, look at the crates/traits imported by the current module.