Struct cw_controllers::Hooks
source · 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