pub struct BgiArchiveBuilder {}
Available on crate features
bgi
and bgi-arc
only.Expand description
Builder for BGI Archive Version 1 scripts.
Implementations§
Trait Implementations§
Source§impl Debug for BgiArchiveBuilder
impl Debug for BgiArchiveBuilder
Source§impl ScriptBuilder for BgiArchiveBuilder
impl ScriptBuilder for BgiArchiveBuilder
Source§fn default_encoding(&self) -> Encoding
fn default_encoding(&self) -> Encoding
Returns the default encoding for the script.
Source§fn default_archive_encoding(&self) -> Option<Encoding>
fn default_archive_encoding(&self) -> Option<Encoding>
Returns the default encoding for the archive.
If None, the default encoding should be used.
Source§fn build_script(
&self,
data: Vec<u8>,
filename: &str,
_encoding: Encoding,
archive_encoding: Encoding,
config: &ExtraConfig,
_archive: Option<&Box<dyn Script>>,
) -> Result<Box<dyn Script>>
fn build_script( &self, data: Vec<u8>, filename: &str, _encoding: Encoding, archive_encoding: Encoding, config: &ExtraConfig, _archive: Option<&Box<dyn Script>>, ) -> Result<Box<dyn Script>>
Builds a script from the given buffer. Read more
Source§fn build_script_from_file(
&self,
filename: &str,
_encoding: Encoding,
archive_encoding: Encoding,
config: &ExtraConfig,
_archive: Option<&Box<dyn Script>>,
) -> Result<Box<dyn Script>>
fn build_script_from_file( &self, filename: &str, _encoding: Encoding, archive_encoding: Encoding, config: &ExtraConfig, _archive: Option<&Box<dyn Script>>, ) -> Result<Box<dyn Script>>
Builds a script from a file. Read more
Source§fn build_script_from_reader(
&self,
reader: Box<dyn ReadSeek>,
filename: &str,
_encoding: Encoding,
archive_encoding: Encoding,
config: &ExtraConfig,
_archive: Option<&Box<dyn Script>>,
) -> Result<Box<dyn Script>>
fn build_script_from_reader( &self, reader: Box<dyn ReadSeek>, filename: &str, _encoding: Encoding, archive_encoding: Encoding, config: &ExtraConfig, _archive: Option<&Box<dyn Script>>, ) -> Result<Box<dyn Script>>
Builds a script from a reader. Read more
Source§fn extensions(&self) -> &'static [&'static str]
fn extensions(&self) -> &'static [&'static str]
Returns the extensions supported by this script builder.
Source§fn script_type(&self) -> &'static ScriptType
fn script_type(&self) -> &'static ScriptType
Returns the script type associated with this builder.
Source§fn is_this_format(
&self,
_filename: &str,
buf: &[u8],
buf_len: usize,
) -> Option<u8>
fn is_this_format( &self, _filename: &str, buf: &[u8], buf_len: usize, ) -> Option<u8>
Checks if the given filename and buffer match this script format. Read more
Source§fn is_archive(&self) -> bool
fn is_archive(&self) -> bool
Returns true if this script is an archive.
Source§fn create_archive(
&self,
filename: &str,
files: &[&str],
encoding: Encoding,
config: &ExtraConfig,
) -> Result<Box<dyn Archive>>
fn create_archive( &self, filename: &str, files: &[&str], encoding: Encoding, config: &ExtraConfig, ) -> Result<Box<dyn Archive>>
Creates an archive with the given files. Read more
Source§fn default_patched_encoding(&self) -> Encoding
fn default_patched_encoding(&self) -> Encoding
Returns the default encoding for script files when patching scripts.
Source§fn can_create_file(&self) -> bool
fn can_create_file(&self) -> bool
Returns true if this script type can create from a file directly.
Source§fn create_file<'a>(
&'a self,
_filename: &'a str,
_writer: Box<dyn WriteSeek + 'a>,
_encoding: Encoding,
_file_encoding: Encoding,
_config: &ExtraConfig,
) -> Result<()>
fn create_file<'a>( &'a self, _filename: &'a str, _writer: Box<dyn WriteSeek + 'a>, _encoding: Encoding, _file_encoding: Encoding, _config: &ExtraConfig, ) -> Result<()>
Creates a new script file. Read more
Source§fn create_file_filename(
&self,
filename: &str,
output_filename: &str,
encoding: Encoding,
file_encoding: Encoding,
config: &ExtraConfig,
) -> Result<()>
fn create_file_filename( &self, filename: &str, output_filename: &str, encoding: Encoding, file_encoding: Encoding, config: &ExtraConfig, ) -> Result<()>
Creates a new script file with the given filename. Read more
Source§fn is_image(&self) -> bool
fn is_image(&self) -> bool
Available on crate feature
image
only.Returns true if this script is an image.
Source§fn can_create_image_file(&self) -> bool
fn can_create_image_file(&self) -> bool
Available on crate feature
image
only.Returns true if this script type can create from an image file directly.
Source§fn create_image_file<'a>(
&'a self,
_data: ImageData,
_writer: Box<dyn WriteSeek + 'a>,
_options: &ExtraConfig,
) -> Result<()>
fn create_image_file<'a>( &'a self, _data: ImageData, _writer: Box<dyn WriteSeek + 'a>, _options: &ExtraConfig, ) -> Result<()>
Available on crate feature
image
only.Creates an image file from the given data. Read more
Source§fn create_image_file_filename(
&self,
data: ImageData,
filename: &str,
options: &ExtraConfig,
) -> Result<()>
fn create_image_file_filename( &self, data: ImageData, filename: &str, options: &ExtraConfig, ) -> Result<()>
Available on crate feature
image
only.Creates an image file from the given data to the specified filename. Read more
Auto Trait Implementations§
impl Freeze for BgiArchiveBuilder
impl RefUnwindSafe for BgiArchiveBuilder
impl Send for BgiArchiveBuilder
impl Sync for BgiArchiveBuilder
impl Unpin for BgiArchiveBuilder
impl UnwindSafe for BgiArchiveBuilder
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