Converting wav to opus with opus crate

Hello is there anyone who can give me a good example how to convert file wav to opus? for example with opus crate or something well maintained.