How to get self-address or self-principal of a canister in rust?

Hello Dears!

Is there any way to get self-address or self-principal of a canister in rust?

https://docs.rs/ic-cdk/0.3.1/ic_cdk/api/fn.id.html

2 Likes