Struct sg_controllers::Hooks
source · pub struct Hooks<'a>(_);
Implementations§
source§impl<'a> Hooks<'a>
impl<'a> Hooks<'a>
pub const fn new(storage_key: &'a str) -> 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 query_hooks<Q: CustomQuery>( &self, deps: Deps<'_, Q> ) -> StdResult<HooksResponse>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Hooks<'a>
impl<'a> Send for Hooks<'a>
impl<'a> Sync for Hooks<'a>
impl<'a> Unpin for Hooks<'a>
impl<'a> UnwindSafe for Hooks<'a>
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§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