StructPack

Trait StructPack 

Source
pub trait StructPack: Sized {
    // Required method
    fn pack<W: Write>(
        &self,
        writer: &mut W,
        big: bool,
        encoding: Encoding,
        info: &Option<Box<dyn Any>>,
    ) -> Result<()>;
}
Expand description

Trait for packing a struct into a binary stream.

Required Methods§

Source

fn pack<W: Write>( &self, writer: &mut W, big: bool, encoding: Encoding, info: &Option<Box<dyn Any>>, ) -> Result<()>

Packs a struct into a binary stream.

  • writer - The writer to write the binary data to.
  • big - Whether to use big-endian format.
  • encoding - The encoding to use for string fields.
  • info - Additional information that may be needed for packing.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl StructPack for bool

Source§

fn pack<W: Write>( &self, writer: &mut W, _big: bool, _encoding: Encoding, _info: &Option<Box<dyn Any>>, ) -> Result<()>

Source§

impl StructPack for f32

Source§

fn pack<W: Write>( &self, writer: &mut W, big: bool, _encoding: Encoding, _info: &Option<Box<dyn Any>>, ) -> Result<()>

Source§

impl StructPack for f64

Source§

fn pack<W: Write>( &self, writer: &mut W, big: bool, _encoding: Encoding, _info: &Option<Box<dyn Any>>, ) -> Result<()>

Source§

impl StructPack for i8

Source§

fn pack<W: Write>( &self, writer: &mut W, big: bool, _encoding: Encoding, _info: &Option<Box<dyn Any>>, ) -> Result<()>

Source§

impl StructPack for i16

Source§

fn pack<W: Write>( &self, writer: &mut W, big: bool, _encoding: Encoding, _info: &Option<Box<dyn Any>>, ) -> Result<()>

Source§

impl StructPack for i32

Source§

fn pack<W: Write>( &self, writer: &mut W, big: bool, _encoding: Encoding, _info: &Option<Box<dyn Any>>, ) -> Result<()>

Source§

impl StructPack for i64

Source§

fn pack<W: Write>( &self, writer: &mut W, big: bool, _encoding: Encoding, _info: &Option<Box<dyn Any>>, ) -> Result<()>

Source§

impl StructPack for i128

Source§

fn pack<W: Write>( &self, writer: &mut W, big: bool, _encoding: Encoding, _info: &Option<Box<dyn Any>>, ) -> Result<()>

Source§

impl StructPack for u8

Source§

fn pack<W: Write>( &self, writer: &mut W, big: bool, _encoding: Encoding, _info: &Option<Box<dyn Any>>, ) -> Result<()>

Source§

impl StructPack for u16

Source§

fn pack<W: Write>( &self, writer: &mut W, big: bool, _encoding: Encoding, _info: &Option<Box<dyn Any>>, ) -> Result<()>

Source§

impl StructPack for u32

Source§

fn pack<W: Write>( &self, writer: &mut W, big: bool, _encoding: Encoding, _info: &Option<Box<dyn Any>>, ) -> Result<()>

Source§

impl StructPack for u64

Source§

fn pack<W: Write>( &self, writer: &mut W, big: bool, _encoding: Encoding, _info: &Option<Box<dyn Any>>, ) -> Result<()>

Source§

impl StructPack for u128

Source§

fn pack<W: Write>( &self, writer: &mut W, big: bool, _encoding: Encoding, _info: &Option<Box<dyn Any>>, ) -> Result<()>

Source§

impl<T: StructPack> StructPack for Option<T>

Source§

fn pack<W: Write>( &self, writer: &mut W, big: bool, encoding: Encoding, info: &Option<Box<dyn Any>>, ) -> Result<()>

Source§

impl<T: StructPack> StructPack for Vec<T>

Source§

fn pack<W: Write>( &self, writer: &mut W, big: bool, encoding: Encoding, info: &Option<Box<dyn Any>>, ) -> Result<()>

Source§

impl<const T: usize> StructPack for [u8; T]

Source§

fn pack<W: Write>( &self, writer: &mut W, _big: bool, _encoding: Encoding, _info: &Option<Box<dyn Any>>, ) -> Result<()>

Implementors§

Source§

impl StructPack for TypedObject

Available on crate feature entis-gls only.
Source§

impl StructPack for EnumGfx

Available on crate feature escude only.
Source§

impl StructPack for EnumScr

Available on crate feature escude only.
Source§

impl StructPack for EnumSnd

Available on crate feature escude only.
Source§

impl StructPack for ListData

Available on crate feature escude only.
Source§

impl StructPack for Pf2EntryHeader

Available on crate features artemis-arc and artemis only.
Source§

impl StructPack for PfsEntryHeader

Available on crate features artemis-arc and artemis only.
Source§

impl StructPack for msg_tool::scripts::bgi::archive::v1::BgiFileHeader

Available on crate features bgi-arc and bgi only.
Source§

impl StructPack for msg_tool::scripts::bgi::archive::v2::BgiFileHeader

Available on crate features bgi-arc and bgi only.
Source§

impl StructPack for BgiCBGHeader

Available on crate features bgi-img and bgi only.
Source§

impl StructPack for Hg3Entry

Available on crate features cat-system-img and cat-system only.
Source§

impl StructPack for PckFileHeader

Available on crate features circus-arc and circus only.
Source§

impl StructPack for msg_tool::scripts::circus::audio::pcm::Header

Available on crate features circus-audio and circus only.
Source§

impl StructPack for Clip

Available on crate features circus-img and circus only.
Source§

impl StructPack for msg_tool::scripts::circus::image::crx::Header

Available on crate features circus-img and circus only.
Source§

impl StructPack for msg_tool::scripts::entis_gls::csx::v1::types::DWordArray

Available on crate feature entis-gls only.
Source§

impl StructPack for EMCFileHeader

Available on crate feature entis-gls only.
Source§

impl StructPack for EXIHeader

Available on crate feature entis-gls only.
Source§

impl StructPack for FunctionNameItem

Available on crate feature entis-gls only.
Source§

impl StructPack for FunctionNameList

Available on crate feature entis-gls only.
Source§

impl StructPack for TaggedRefAddress

Available on crate feature entis-gls only.
Source§

impl StructPack for TaggedRefAddressList

Available on crate feature entis-gls only.
Source§

impl StructPack for msg_tool::scripts::entis_gls::csx::v1::types::WideString

Available on crate feature entis-gls only.
Source§

impl StructPack for ArrayDimensionObject

Available on crate feature entis-gls only.
Source§

impl StructPack for ArrayObject

Available on crate feature entis-gls only.
Source§

impl StructPack for BaseClassCastInfoEntry

Available on crate feature entis-gls only.
Source§

impl StructPack for BaseClassInfoEntry

Available on crate feature entis-gls only.
Source§

impl StructPack for ClassInfoEntry

Available on crate feature entis-gls only.
Source§

impl StructPack for ClassInfoObject

Available on crate feature entis-gls only.
Source§

impl StructPack for ConstStringEntry

Available on crate feature entis-gls only.
Source§

impl StructPack for msg_tool::scripts::entis_gls::csx::v2::types::DWordArray

Available on crate feature entis-gls only.
Source§

impl StructPack for ECSCastInterface

Available on crate feature entis-gls only.
Source§

impl StructPack for FieldInfoEntry

Available on crate feature entis-gls only.
Source§

impl StructPack for FileHeader

Available on crate feature entis-gls only.
Source§

impl StructPack for FuncEntryHeader

Available on crate feature entis-gls only.
Source§

impl StructPack for FuncInfoEntry

Available on crate feature entis-gls only.
Source§

impl StructPack for FuncNameEntry

Available on crate feature entis-gls only.
Source§

impl StructPack for GlobalObjectEntry

Available on crate feature entis-gls only.
Source§

impl StructPack for HashContainerObject

Available on crate feature entis-gls only.
Source§

impl StructPack for Integer64Object

Available on crate feature entis-gls only.
Source§

impl StructPack for MethodInfoEntry

Available on crate feature entis-gls only.
Source§

impl StructPack for NakedSymbolInfoEntry

Available on crate feature entis-gls only.
Source§

impl StructPack for PointerObject

Available on crate feature entis-gls only.
Source§

impl StructPack for PrototypeInfoEntry

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionClassInfo

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionConstString

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionData

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionFuncInfo

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionFunction

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionGlobal

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionHeader

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionImportNativeFunc

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionInitNakedFunc

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionLinkInfo

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionLinkInfoEx

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionNakedFunc

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionNativeFunc

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionRefClass

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionRefCode

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionRefFunc

Available on crate feature entis-gls only.
Source§

impl StructPack for SectionSymbolInfo

Available on crate feature entis-gls only.
Source§

impl StructPack for SymbolInfoEntry

Available on crate feature entis-gls only.
Source§

impl StructPack for TagedDwordArray

Available on crate feature entis-gls only.
Source§

impl StructPack for TagedDwordArrayEntry

Available on crate feature entis-gls only.
Source§

impl StructPack for TagedObjectEntry

Available on crate feature entis-gls only.
Source§

impl StructPack for TypeInfoEntry

Available on crate feature entis-gls only.
Source§

impl StructPack for msg_tool::scripts::entis_gls::csx::v2::types::WideString

Available on crate feature entis-gls only.
Source§

impl StructPack for AmbT

Available on crate feature escude only.
Source§

impl StructPack for BgT

Available on crate feature escude only.
Source§

impl StructPack for BgmT

Available on crate feature escude only.
Source§

impl StructPack for EfxT

Available on crate feature escude only.
Source§

impl StructPack for EvT

Available on crate feature escude only.
Source§

impl StructPack for LocT

Available on crate feature escude only.
Source§

impl StructPack for NameT

Available on crate feature escude only.
Source§

impl StructPack for Point

Available on crate feature escude only.
Source§

impl StructPack for SceneT

Available on crate feature escude only.
Source§

impl StructPack for ScriptT2

Available on crate feature escude only.
Source§

impl StructPack for ScriptT

Available on crate feature escude only.
Source§

impl StructPack for SeT

Available on crate feature escude only.
Source§

impl StructPack for SfxT

Available on crate feature escude only.
Source§

impl StructPack for StT

Available on crate feature escude only.
Source§

impl StructPack for VarT

Available on crate feature escude only.
Source§

impl StructPack for msg_tool::scripts::ex_hibit::rld::Header

Available on crate feature ex-hibit only.
Source§

impl StructPack for Op

Available on crate feature ex-hibit only.
Source§

impl StructPack for OpExt

Available on crate feature ex-hibit only.
Source§

impl StructPack for DataArea

Available on crate feature kirikiri only.
Source§

impl StructPack for msg_tool::scripts::kirikiri::tjs_ns0::Header

Available on crate feature kirikiri only.
Source§

impl StructPack for PazEntry

Available on crate features musica-arc and musica only.
Source§

impl StructPack for QlieHash12

Available on crate features qlie-arc and qlie only.
Source§

impl StructPack for QlieHash13

Available on crate features qlie-arc and qlie only.
Source§

impl StructPack for QlieHash14

Available on crate features qlie-arc and qlie only.
Source§

impl StructPack for QlieHeader

Available on crate features qlie-arc and qlie only.
Source§

impl StructPack for QlieKey

Available on crate features qlie-arc and qlie only.
Source§

impl StructPack for DpngFile

Available on crate features qlie-img and qlie only.
Source§

impl StructPack for DpngHeader

Available on crate features qlie-img and qlie only.
Source§

impl StructPack for Tile

Available on crate features qlie-img and qlie only.
Source§

impl StructPack for PgdDiffHeader

Available on crate features softpal-img and softpal only.
Source§

impl StructPack for PgdGeHeader

Available on crate features softpal-img and softpal only.
Source§

impl StructPack for FrameHeader

Available on crate features will-plus-img and will-plus only.
Source§

impl StructPack for CustomHeader

Available on crate features yaneurao-itufuru and yaneurao only.
Source§

impl StructPack for ItufuruFileHeader

Available on crate features yaneurao-itufuru and yaneurao only.
Source§

impl StructPack for PcmFormat

Available on crate feature utils-pcm only.
Source§

impl StructPack for AdditionalLayerInfo

Available on crate feature utils-psd only.
Source§

impl StructPack for LayerID

Available on crate feature utils-psd only.
Source§

impl StructPack for LayerNameSourceSetting

Available on crate feature utils-psd only.
Source§

impl StructPack for ChannelImageData

Available on crate feature utils-psd only.
Source§

impl StructPack for ChannelInfo

Available on crate feature utils-psd only.
Source§

impl StructPack for ChannelRange

Available on crate feature utils-psd only.
Source§

impl StructPack for ColorModeData

Available on crate feature utils-psd only.
Source§

impl StructPack for GlobalLayerMaskInfo

Available on crate feature utils-psd only.
Source§

impl StructPack for ImageDataSection

Available on crate feature utils-psd only.
Source§

impl StructPack for ImageResourceBlock

Available on crate feature utils-psd only.
Source§

impl StructPack for ImageResourceSection

Available on crate feature utils-psd only.
Source§

impl StructPack for LayerAndMaskInfo

Available on crate feature utils-psd only.
Source§

impl StructPack for LayerBlendingRanges

Available on crate feature utils-psd only.
Source§

impl StructPack for LayerInfo

Available on crate feature utils-psd only.
Source§

impl StructPack for LayerMask

Available on crate feature utils-psd only.
Source§

impl StructPack for LayerRecord

Available on crate feature utils-psd only.
Source§

impl StructPack for LayerRecordBase

Available on crate feature utils-psd only.
Source§

impl StructPack for PascalString4

Available on crate feature utils-psd only.
Source§

impl StructPack for PascalString

Available on crate feature utils-psd only.
Source§

impl StructPack for PsdFile

Available on crate feature utils-psd only.
Source§

impl StructPack for PsdHeader

Available on crate feature utils-psd only.
Source§

impl StructPack for SectionDividerSetting

Available on crate feature utils-psd only.
Source§

impl StructPack for UnicodeLayer

Available on crate feature utils-psd only.
Source§

impl StructPack for UnicodeString

Available on crate feature utils-psd only.