pub struct Hooks(/* private fields */);
Implementations§
Source§impl Hooks
impl Hooks
pub const fn new(storage_key: &'static str) -> Self
pub fn new_dyn(storage_key: impl Into<Namespace>) -> Self
pub fn add_hook( &self, storage: &mut dyn Storage, addr: Addr, ) -> Result<(), HookError>
pub fn remove_hook( &self, storage: &mut dyn Storage, addr: Addr, ) -> Result<(), HookError>
pub fn prepare_hooks<F: Fn(Addr) -> StdResult<SubMsg>>( &self, storage: &dyn Storage, prep: F, ) -> StdResult<Vec<SubMsg>>
pub fn execute_add_hook<C, Q: CustomQuery>( &self, admin: &Admin, deps: DepsMut<'_, Q>, info: MessageInfo, addr: Addr, ) -> Result<Response<C>, HookError>
pub fn execute_remove_hook<C, Q: CustomQuery>( &self, admin: &Admin, deps: DepsMut<'_, Q>, info: MessageInfo, addr: Addr, ) -> Result<Response<C>, HookError>
pub fn query_hooks<Q: CustomQuery>( &self, deps: Deps<'_, Q>, ) -> StdResult<HooksResponse>
pub fn query_hook<Q: CustomQuery>( &self, deps: Deps<'_, Q>, hook: String, ) -> StdResult<bool>
Auto Trait Implementations§
impl Freeze for Hooks
impl RefUnwindSafe for Hooks
impl Send for Hooks
impl Sync for Hooks
impl Unpin for Hooks
impl UnwindSafe for Hooks
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more