Struct HiddenParts
#[non_exhaustive]pub struct HiddenParts { /* private fields */ }Expand description
The parts a mod hid from a vanilla model this frame (player_submit, mob_submit), by their
names in the model (head, nose, right_front_leg): at most MAX_HIDDEN_PARTS names of
at most MAX_PART_NAME bytes, nothing allocated. A hidden part takes its children with it
(the hat goes with the head). An unknown name refuses the draw with the mob type and name.
Typed humanoid parts have separate storage and always fit alongside named parts.
Implementations§
§impl HiddenParts
impl HiddenParts
pub fn hide(&mut self, part: HumanoidPart)
pub fn hide(&mut self, part: HumanoidPart)
Leaves the humanoid part out of the vanilla model this frame.
pub fn hide_named(&mut self, name: &str) -> Result<(), HideError>
pub fn hide_named(&mut self, name: &str) -> Result<(), HideError>
Leaves the part named name out of the vanilla model this frame; hiding a name twice
keeps one.
pub fn contains(&self, part: HumanoidPart) -> bool
pub fn contains(&self, part: HumanoidPart) -> bool
Whether the humanoid part is hidden.
pub fn contains_named(&self, name: &str) -> bool
pub fn contains_named(&self, name: &str) -> bool
Whether the part named name is hidden.
Trait Implementations§
§impl Clone for HiddenParts
impl Clone for HiddenParts
§fn clone(&self) -> HiddenParts
fn clone(&self) -> HiddenParts
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for HiddenParts
§impl Debug for HiddenParts
impl Debug for HiddenParts
§impl Default for HiddenParts
impl Default for HiddenParts
§fn default() -> HiddenParts
fn default() -> HiddenParts
Returns the “default value” for a type. Read more
impl Eq for HiddenParts
§impl PartialEq for HiddenParts
impl PartialEq for HiddenParts
impl StructuralPartialEq for HiddenParts
§impl TryFrom<HiddenPartsWire> for HiddenParts
impl TryFrom<HiddenPartsWire> for HiddenParts
§fn try_from(
v: HiddenPartsWire,
) -> Result<HiddenParts, <HiddenParts as TryFrom<HiddenPartsWire>>::Error>
fn try_from( v: HiddenPartsWire, ) -> Result<HiddenParts, <HiddenParts as TryFrom<HiddenPartsWire>>::Error>
Performs the conversion.
§impl Wire for HiddenPartswhere
HiddenPartsWire: Wire + for<'__wire> From<&'__wire HiddenParts>,
HiddenParts: TryFrom<HiddenPartsWire>,
impl Wire for HiddenPartswhere
HiddenPartsWire: Wire + for<'__wire> From<&'__wire HiddenParts>,
HiddenParts: TryFrom<HiddenPartsWire>,
Auto Trait Implementations§
impl Freeze for HiddenParts
impl RefUnwindSafe for HiddenParts
impl Send for HiddenParts
impl Sync for HiddenParts
impl Unpin for HiddenParts
impl UnsafeUnpin for HiddenParts
impl UnwindSafe for HiddenParts
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