feat: add clone derive
This commit is contained in:
parent
187e8e65dd
commit
7321cb4d14
|
@ -14,7 +14,7 @@ pub use self::{
|
|||
payload::Payload,
|
||||
};
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct SeString(pub Vec<Payload>);
|
||||
|
||||
impl SeString {
|
||||
|
|
|
@ -34,7 +34,7 @@ pub use self::{
|
|||
use crate::Error;
|
||||
use std::io::{Read, Cursor, Seek, SeekFrom};
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub enum Payload {
|
||||
AutoTranslate(AutoTranslatePayload),
|
||||
DalamudLink(DalamudLinkPayload),
|
||||
|
|
|
@ -6,7 +6,7 @@ use std::{
|
|||
use byteorder::ReadBytesExt;
|
||||
use crate::payload::SeStringChunkKind;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct AutoTranslatePayload {
|
||||
pub group: u8,
|
||||
pub key: u32,
|
||||
|
|
|
@ -3,7 +3,7 @@ use std::io::{Read, Seek};
|
|||
use byteorder::ReadBytesExt;
|
||||
use crate::payload::{SeStringChunkKind, SeInteractableKind};
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct DalamudLinkPayload {
|
||||
pub plugin: String,
|
||||
pub command: u32,
|
||||
|
|
|
@ -2,7 +2,7 @@ use crate::payload::{Decode, Encode, SeStringChunkKind};
|
|||
use std::io::{Read, Seek};
|
||||
use crate::Payload;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct EmphasisPayload(pub bool);
|
||||
|
||||
impl EmphasisPayload {
|
||||
|
|
|
@ -2,7 +2,7 @@ use crate::payload::{Decode, Encode, SeStringChunkKind};
|
|||
use std::io::{Read, Seek};
|
||||
use crate::Payload;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct IconPayload(pub u32);
|
||||
|
||||
impl From<u32> for IconPayload {
|
||||
|
|
|
@ -2,7 +2,7 @@ use crate::{Error, payload::{Decode, Encode}, Payload};
|
|||
use std::io::{Read, Seek, SeekFrom};
|
||||
use crate::payload::{SeStringChunkKind, SeInteractableKind};
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct ItemPayload {
|
||||
pub id: u32,
|
||||
pub hq: bool,
|
||||
|
|
|
@ -2,7 +2,7 @@ use crate::{Error, payload::{Decode, Encode}, Payload};
|
|||
use std::io::{Read, Seek, SeekFrom};
|
||||
use crate::payload::{SeStringChunkKind, SeInteractableKind};
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct MapLinkPayload {
|
||||
pub territory_type: u32,
|
||||
pub map: u32,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::payload::{Encode, SeStringChunkKind};
|
||||
use crate::Payload;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct NewLinePayload;
|
||||
|
||||
impl Encode for NewLinePayload {
|
||||
|
|
|
@ -2,7 +2,7 @@ use crate::{Error, payload::{Decode, Encode}, Payload};
|
|||
use std::io::{Read, Seek, SeekFrom};
|
||||
use crate::payload::{SeStringChunkKind, SeInteractableKind};
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct PlayerPayload {
|
||||
pub server_id: u32,
|
||||
pub name: String,
|
||||
|
|
|
@ -2,7 +2,7 @@ use crate::payload::{Decode, Encode, SeStringChunkKind, SeInteractableKind};
|
|||
use std::io::{Read, Seek};
|
||||
use crate::Payload;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct QuestPayload(pub u32);
|
||||
|
||||
impl QuestPayload {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::{Error, payload::{Decode, Encode}, Payload};
|
||||
use std::io::{Read, Seek};
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct RawPayload(pub Vec<u8>);
|
||||
|
||||
impl AsRef<[u8]> for RawPayload {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::payload::{Encode, SeStringChunkKind};
|
||||
use crate::Payload;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct SeHyphenPayload;
|
||||
|
||||
impl Encode for SeHyphenPayload {
|
||||
|
|
|
@ -2,7 +2,7 @@ use crate::payload::{Decode, Encode, SeStringChunkKind, SeInteractableKind};
|
|||
use std::io::{Read, Seek};
|
||||
use crate::Payload;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct StatusPayload(pub u32);
|
||||
|
||||
impl From<u32> for StatusPayload {
|
||||
|
|
|
@ -5,7 +5,7 @@ use crate::{
|
|||
use std::io::{Read, Seek, SeekFrom};
|
||||
use crate::Payload;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct TextPayload(pub String);
|
||||
|
||||
impl<T: Into<String>> From<T> for TextPayload {
|
||||
|
|
|
@ -2,7 +2,7 @@ use crate::payload::{Decode, Encode, SeStringChunkKind};
|
|||
use std::io::{Read, Seek};
|
||||
use crate::Payload;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct UiForegroundPayload(pub u32);
|
||||
|
||||
impl From<u32> for UiForegroundPayload {
|
||||
|
|
|
@ -2,7 +2,7 @@ use crate::payload::{Decode, Encode, SeStringChunkKind};
|
|||
use std::io::{Read, Seek};
|
||||
use crate::Payload;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct UiGlowPayload(pub u32);
|
||||
|
||||
impl From<u32> for UiGlowPayload {
|
||||
|
|
Loading…
Reference in New Issue