pub struct DrefBuilder {}
Available on crate feature
emote-img
only.Expand description
Emote DREF Script Builder
Implementations§
Source§impl DrefBuilder
impl DrefBuilder
Trait Implementations§
Source§impl Debug for DrefBuilder
impl Debug for DrefBuilder
Source§impl ScriptBuilder for DrefBuilder
impl ScriptBuilder for DrefBuilder
Source§fn default_encoding(&self) -> Encoding
fn default_encoding(&self) -> Encoding
Returns the default encoding for the script.
Source§fn build_script(
&self,
buf: Vec<u8>,
filename: &str,
encoding: Encoding,
_archive_encoding: Encoding,
config: &ExtraConfig,
archive: Option<&Box<dyn Script>>,
) -> Result<Box<dyn Script>>
fn build_script( &self, buf: 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 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_image(&self) -> bool
fn is_image(&self) -> bool
Available on crate feature
image
only.Returns true if this script is an image.
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 default_patched_encoding(&self) -> Encoding
fn default_patched_encoding(&self) -> Encoding
Returns the default encoding for script files when patching scripts.
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 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 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 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 DrefBuilder
impl RefUnwindSafe for DrefBuilder
impl Send for DrefBuilder
impl Sync for DrefBuilder
impl Unpin for DrefBuilder
impl UnwindSafe for DrefBuilder
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