pub struct Psb {
psb: VirtualPsbFixed,
encoding: Encoding,
config: ExtraConfig,
}Available on crate feature
emote-img only.Fields§
§psb: VirtualPsbFixed§encoding: Encoding§config: ExtraConfigImplementations§
Source§impl Psb
impl Psb
pub fn new<R: Read + Seek>( reader: R, encoding: Encoding, config: &ExtraConfig, ) -> Result<Self>
fn output_resource( &self, folder_path: &PathBuf, path: String, data: &[u8], ) -> Result<Resource>
fn output_rle_resource( &self, folder_path: &PathBuf, path: String, data: &[u8], width: i64, height: i64, ) -> Result<Resource>
Trait Implementations§
Source§impl Script for Psb
impl Script for Psb
Source§fn default_output_script_type(&self) -> OutputScriptType
fn default_output_script_type(&self) -> OutputScriptType
Returns the default output script type for this script.
Source§fn is_output_supported(&self, output: OutputScriptType) -> bool
fn is_output_supported(&self, output: OutputScriptType) -> bool
Checks if the given output script type is supported by this script.
Source§fn default_format_type(&self) -> FormatOptions
fn default_format_type(&self) -> FormatOptions
Returns the default format options for this script.
Source§fn custom_output_extension<'a>(&'a self) -> &'a str
fn custom_output_extension<'a>(&'a self) -> &'a str
Returns the output extension for this script when exporting with custom output.
Source§fn custom_export(&self, filename: &Path, encoding: Encoding) -> Result<()>
fn custom_export(&self, filename: &Path, encoding: Encoding) -> Result<()>
Exports data from this script. Read more
Source§fn custom_import<'a>(
&'a self,
custom_filename: &'a str,
file: Box<dyn WriteSeek + 'a>,
encoding: Encoding,
output_encoding: Encoding,
) -> Result<()>
fn custom_import<'a>( &'a self, custom_filename: &'a str, file: Box<dyn WriteSeek + 'a>, encoding: Encoding, output_encoding: Encoding, ) -> Result<()>
Imports data into this script. Read more
Source§fn multiple_message_files(&self) -> bool
fn multiple_message_files(&self) -> bool
Returns true if this script can contains multiple message files.
Source§fn extract_multiple_messages(&self) -> Result<HashMap<String, Vec<Message>>>
fn extract_multiple_messages(&self) -> Result<HashMap<String, Vec<Message>>>
Extract multiple messages from this script.
Source§fn import_messages<'a>(
&'a self,
_messages: Vec<Message>,
_file: Box<dyn WriteSeek + 'a>,
_filename: &str,
_encoding: Encoding,
_replacement: Option<&'a ReplacementTable>,
) -> Result<()>
fn import_messages<'a>( &'a self, _messages: Vec<Message>, _file: Box<dyn WriteSeek + 'a>, _filename: &str, _encoding: Encoding, _replacement: Option<&'a ReplacementTable>, ) -> Result<()>
Import messages into this script. Read more
Source§fn import_multiple_messages<'a>(
&'a self,
_messages: HashMap<String, Vec<Message>>,
_file: Box<dyn WriteSeek + 'a>,
_filename: &str,
_encoding: Encoding,
_replacement: Option<&'a ReplacementTable>,
) -> Result<()>
fn import_multiple_messages<'a>( &'a self, _messages: HashMap<String, Vec<Message>>, _file: Box<dyn WriteSeek + 'a>, _filename: &str, _encoding: Encoding, _replacement: Option<&'a ReplacementTable>, ) -> Result<()>
Import multiple messages into this script. Read more
Source§fn import_messages_filename(
&self,
messages: Vec<Message>,
filename: &str,
encoding: Encoding,
replacement: Option<&ReplacementTable>,
) -> Result<()>
fn import_messages_filename( &self, messages: Vec<Message>, filename: &str, encoding: Encoding, replacement: Option<&ReplacementTable>, ) -> Result<()>
Import messages into this script. Read more
Source§fn import_multiple_messages_filename(
&self,
messages: HashMap<String, Vec<Message>>,
filename: &str,
encoding: Encoding,
replacement: Option<&ReplacementTable>,
) -> Result<()>
fn import_multiple_messages_filename( &self, messages: HashMap<String, Vec<Message>>, filename: &str, encoding: Encoding, replacement: Option<&ReplacementTable>, ) -> Result<()>
Import multiple messages into this script. Read more
Source§fn custom_import_filename(
&self,
custom_filename: &str,
filename: &str,
encoding: Encoding,
output_encoding: Encoding,
) -> Result<()>
fn custom_import_filename( &self, custom_filename: &str, filename: &str, encoding: Encoding, output_encoding: Encoding, ) -> Result<()>
Imports data into this script. Read more
Source§fn is_archive(&self) -> bool
fn is_archive(&self) -> bool
Returns true if this script is an archive.
Source§fn iter_archive_filename<'a>(
&'a self,
) -> Result<Box<dyn Iterator<Item = Result<String>> + 'a>>
fn iter_archive_filename<'a>( &'a self, ) -> Result<Box<dyn Iterator<Item = Result<String>> + 'a>>
Returns an iterator over archive filenames.
Source§fn iter_archive_offset<'a>(
&'a self,
) -> Result<Box<dyn Iterator<Item = Result<u64>> + 'a>>
fn iter_archive_offset<'a>( &'a self, ) -> Result<Box<dyn Iterator<Item = Result<u64>> + 'a>>
Returns an iterator over archive offsets.
Source§fn open_file<'a>(
&'a self,
_index: usize,
) -> Result<Box<dyn ArchiveContent + 'a>>
fn open_file<'a>( &'a self, _index: usize, ) -> Result<Box<dyn ArchiveContent + 'a>>
Opens a file in the archive by its index.
Source§fn open_file_by_name<'a>(
&'a self,
name: &str,
ignore_case: bool,
) -> Result<Box<dyn ArchiveContent + 'a>>
fn open_file_by_name<'a>( &'a self, name: &str, ignore_case: bool, ) -> Result<Box<dyn ArchiveContent + 'a>>
Opens a file in the archive by its name. Read more
Source§fn open_file_by_offset<'a>(
&'a self,
offset: u64,
) -> Result<Box<dyn ArchiveContent + 'a>>
fn open_file_by_offset<'a>( &'a self, offset: u64, ) -> Result<Box<dyn ArchiveContent + 'a>>
Opens a file in the archive by its offset.
Source§fn archive_output_ext<'a>(&'a self) -> Option<&'a str>
fn archive_output_ext<'a>(&'a self) -> Option<&'a str>
Returns output extension for archive output folder.
Source§fn is_image(&self) -> bool
fn is_image(&self) -> bool
Available on crate feature
image only.Returns true if this script type is an image.
Source§fn export_image(&self) -> Result<ImageData>
fn export_image(&self) -> Result<ImageData>
Available on crate feature
image only.Exports the image data from this script.
Source§fn import_image<'a>(
&'a self,
_data: ImageData,
_file: Box<dyn WriteSeek + 'a>,
) -> Result<()>
fn import_image<'a>( &'a self, _data: ImageData, _file: Box<dyn WriteSeek + 'a>, ) -> Result<()>
Available on crate feature
image only.Imports an image into this script. Read more
Source§fn import_image_filename(&self, data: ImageData, filename: &str) -> Result<()>
fn import_image_filename(&self, data: ImageData, filename: &str) -> Result<()>
Available on crate feature
image only.Imports an image into this script. Read more
Source§fn is_multi_image(&self) -> bool
fn is_multi_image(&self) -> bool
Available on crate feature
image only.Returns true if this script is contains multiple images.
Source§fn export_multi_image<'a>(
&'a self,
) -> Result<Box<dyn Iterator<Item = Result<ImageDataWithName>> + 'a>>
fn export_multi_image<'a>( &'a self, ) -> Result<Box<dyn Iterator<Item = Result<ImageDataWithName>> + 'a>>
Available on crate feature
image only.Exports multiple images from this script.
Source§fn import_multi_image<'a>(
&'a self,
_data: Vec<ImageDataWithName>,
_file: Box<dyn WriteSeek + 'a>,
) -> Result<()>
fn import_multi_image<'a>( &'a self, _data: Vec<ImageDataWithName>, _file: Box<dyn WriteSeek + 'a>, ) -> Result<()>
Available on crate feature
image only.Imports multiple images into this script. Read more
Source§fn import_multi_image_filename(
&self,
data: Vec<ImageDataWithName>,
filename: &str,
) -> Result<()>
fn import_multi_image_filename( &self, data: Vec<ImageDataWithName>, filename: &str, ) -> Result<()>
Available on crate feature
image only.Imports multiple images into this script. Read more
Auto Trait Implementations§
impl Freeze for Psb
impl RefUnwindSafe for Psb
impl Send for Psb
impl Sync for Psb
impl Unpin for Psb
impl UnwindSafe for Psb
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more