The avail_rust crate has been replaced by avail_rust_client but the docs still mention the implementation of avail_rust as seen in the screenshot below:
Replace the example by the following example mentioned here:
https://github.com/availproject/avail-rust/blob/main/client/README.md