pub struct Inject {Show 15 fields
pub point: String,
pub kind: String,
pub class: String,
pub method: String,
pub desc: String,
pub at: String,
pub target: String,
pub ordinal: i32,
pub shift: String,
pub cancellable: bool,
pub index: i32,
pub constant: String,
pub value_desc: String,
pub write: bool,
pub locals: Vec<String>,
}Expand description
A nanite a mod declares (#[inject], #[redirect], #[modify_arg]…):
where, by Mojang’s names, and what it does there — what the host turns
into the Mixin injector of its kind before the class loads. Mods at one
point share it: its Inject::point is the event’s key, their handlers
ordered by the bus’s priorities.
Fields§
§point: StringThe point’s key (point).
kind: Stringyog_ids::nanite_kind.
class: Stringnet.minecraft.world.entity.LivingEntity.
method: String§desc: String§at: StringMixin’s @At value (yog_ids::mixin_at).
target: StringWhat an INVOKE / FIELD / NEW at names (Lowner;name(desc), Mojang’s), else empty.
ordinal: i32Which occurrence (-1: every one).
shift: Stringyog_ids::mixin_shift.
cancellable: boolWhether handlers may cancel the method (or set its return value).
index: i32A modify_arg’s argument, a modify_variable’s local (-1: by type).
constant: StringA modify_constant’s constant: <yog_ids::nanite_constant>:<value>.
value_desc: StringA modify_variable’s local’s type (a descriptor, Mojang’s).
write: boolA FIELD at’s write (PUTFIELD / PUTSTATIC), else its read.
locals: Vec<String>The locals an inject asks for, in order: [&]<descriptor>[@<ordinal>]
(yog_ids::nanite_local; Mojang’s names).
Trait Implementations§
impl Eq for Inject
Source§impl Schema for Inject
impl Schema for Inject
Source§fn encode(&self, __yog_w: &mut Writer)
fn encode(&self, __yog_w: &mut Writer)
Schema::write’s
value encoded, unless the type knows better (derived ones do).Source§fn decode(__yog_d: &mut Decoder<'_>) -> Option<Inject>
fn decode(__yog_d: &mut Decoder<'_>) -> Option<Inject>
None when it isn’t
what Schema::encode writes — then read_bytes reads the slow
way, which says what’s wrong. Through a value unless the type knows
better (derived ones do).Source§fn pack(&self, __yog_p: &mut Packer)
fn pack(&self, __yog_p: &mut Packer)
crate::frame): its binary form as
bytes, unless the type packs itself (derived ones and plain types do).Source§fn unpack(__yog_u: &mut Unpacker<'_>) -> Option<Inject>
fn unpack(__yog_u: &mut Unpacker<'_>) -> Option<Inject>
None if the bytes aren’t what
Schema::pack writes.Source§fn read(v: &ValueRef<'_>, cx: &mut Reader<'_>) -> Option<Inject>
fn read(v: &ValueRef<'_>, cx: &mut Reader<'_>) -> Option<Inject>
v. Problems go to cx at its current path; None when the
value couldn’t be read (the problem is in cx).Source§fn absent() -> Option<Self>
fn absent() -> Option<Self>
None: the field is required.Source§fn pack_list(items: &[Self], p: &mut Packer)
fn pack_list(items: &[Self], p: &mut Packer)
Source§fn encode_list(items: &[Self], w: &mut Writer)
fn encode_list(items: &[Self], w: &mut Writer)
impl StructuralPartialEq for Inject
Auto Trait Implementations§
impl Freeze for Inject
impl RefUnwindSafe for Inject
impl Send for Inject
impl Sync for Inject
impl Unpin for Inject
impl UnsafeUnpin for Inject
impl UnwindSafe for Inject
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Message for Twhere
T: Schema,
impl<T> Message for Twhere
T: Schema,
Source§fn from_bytes(bytes: &[u8]) -> Option<Self>
fn from_bytes(bytes: &[u8]) -> Option<Self>
None if it isn’t one.Source§fn with_bytes<R>(&self, f: impl FnOnce(&[u8]) -> R) -> R
fn with_bytes<R>(&self, f: impl FnOnce(&[u8]) -> R) -> R
f on the payload, packed in this thread’s reused buffers: nothing
allocated once they’ve grown to the thread’s messages.