Struct pso2packetlib::protocol::palette::UpdatePalettePacket
source · pub struct UpdatePalettePacket {
pub cur_palette: u32,
pub palettes: [WeaponPalette; 6],
}Expand description
(0x21, 0x06) Update Palette.
(C -> S) Sent when a player updates their palette (i.e. changes installed weapons).
Respond with:
crate::protocol::Packet::LoadPalette
Fields§
§cur_palette: u32Current palette index.
palettes: [WeaponPalette; 6]New palettes.
Trait Implementations§
source§impl Clone for UpdatePalettePacket
impl Clone for UpdatePalettePacket
source§fn clone(&self) -> UpdatePalettePacket
fn clone(&self) -> UpdatePalettePacket
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for UpdatePalettePacket
impl Debug for UpdatePalettePacket
source§impl Default for UpdatePalettePacket
impl Default for UpdatePalettePacket
source§fn default() -> UpdatePalettePacket
fn default() -> UpdatePalettePacket
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for UpdatePalettePacketwhere
UpdatePalettePacket: Default,
impl<'de> Deserialize<'de> for UpdatePalettePacketwhere
UpdatePalettePacket: Default,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PacketReadWrite for UpdatePalettePacket
impl PacketReadWrite for UpdatePalettePacket
source§fn read(
reader: &mut (impl Read + Seek),
flags: &Flags,
packet_type: PacketType,
) -> Result<Self, PacketError>
fn read( reader: &mut (impl Read + Seek), flags: &Flags, packet_type: PacketType, ) -> Result<Self, PacketError>
Reads a packet from a stream.
source§fn write(&self, packet_type: PacketType) -> Result<Vec<u8>, PacketError>
fn write(&self, packet_type: PacketType) -> Result<Vec<u8>, PacketError>
Writes a packet to a Vec.
source§impl PartialEq for UpdatePalettePacket
impl PartialEq for UpdatePalettePacket
source§fn eq(&self, other: &UpdatePalettePacket) -> bool
fn eq(&self, other: &UpdatePalettePacket) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for UpdatePalettePacket
impl Serialize for UpdatePalettePacket
impl StructuralPartialEq for UpdatePalettePacket
Auto Trait Implementations§
impl Freeze for UpdatePalettePacket
impl RefUnwindSafe for UpdatePalettePacket
impl Send for UpdatePalettePacket
impl Sync for UpdatePalettePacket
impl Unpin for UpdatePalettePacket
impl UnwindSafe for UpdatePalettePacket
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)