pub fn ensure_owner<T, E>(
owner: &T,
sender: &Addr,
unauthorized: impl FnOnce() -> E,
) -> Result<(), E>where
T: OwnerAddress + ?Sized,Expand description
Verifies that sender is the owner and returns a caller-provided unauthorized error otherwise.