pub struct Hook<'a>(/* private fields */);Expand description
An injection point reached, as a handler sees it.
Implementations§
Source§impl<'a> Hook<'a>
impl<'a> Hook<'a>
Sourcepub fn this<T: Nanite>(&self) -> Option<T>
pub fn this<T: Nanite>(&self) -> Option<T>
The object the method runs on (none in a static one).
Sourcepub fn set_return<T: Java>(&mut self, value: T)
pub fn set_return<T: Java>(&mut self, value: T)
Stops the method returning value.
Sourcepub fn set_value<T: Java>(&mut self, value: T)
pub fn set_value<T: Java>(&mut self, value: T)
Makes value the answer: a modified value, a redirected call’s result.
Sourcepub fn call_original(&self, args: Vec<Value>) -> Option<Value>
pub fn call_original(&self, args: Vec<Value>) -> Option<Value>
Runs a redirected call as it was, with args (the receiver first): its result.
Auto Trait Implementations§
impl<'a> !UnwindSafe for Hook<'a>
impl<'a> Freeze for Hook<'a>
impl<'a> RefUnwindSafe for Hook<'a>
impl<'a> Send for Hook<'a>
impl<'a> Sync for Hook<'a>
impl<'a> Unpin for Hook<'a>
impl<'a> UnsafeUnpin for Hook<'a>
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