Struct pmd_message::MessageBin [−][src]
A structure representing a translation (message) file in 3ds pokemon mystery dungeon games.
Each text have an associated (32bit, probably crc32) hash associated with them as a key.
Implementations
impl MessageBin
[src]
pub fn messages(&self) -> &Vec<(u32, u32, String)>
[src]
Return all the hash, the unk value and message content stored in the file
pub fn message_by_hash(&self, hash: u32) -> Option<&String>
[src]
Return the message content with the given hash if it exist.
pub fn insert(&mut self, hash: u32, unk: u32, message: String)
[src]
If the hash is already present, update the message content and unknown value, otherwise, add a new message at the end of the messages list. Return the old string if it exist.
pub fn load_file<T: Read + Seek>(
file: &mut T
) -> Result<Self, MessageBinReadError>
[src]
file: &mut T
) -> Result<Self, MessageBinReadError>
Load a MessageBin file from the reader.
pub fn write<T: Seek + Write>(
&self,
file: &mut T
) -> Result<(), MessageBinWriteError>
[src]
&self,
file: &mut T
) -> Result<(), MessageBinWriteError>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MessageBin
impl Send for MessageBin
impl Sync for MessageBin
impl Unpin for MessageBin
impl UnwindSafe for MessageBin
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,