pub struct MockTxEmbed {
pub data: String,
pub path: PathBuf,
pub type_id_dict: HashMap<String, String>,
}
Expand description
Struct to hold embedded data, its file path, and a dictionary for type IDs
Fields§
§data: String
§path: PathBuf
§type_id_dict: HashMap<String, String>
Implementations§
Source§impl MockTxEmbed
impl MockTxEmbed
pub fn new(path: PathBuf, data: String) -> Self
Sourcepub fn replace_data(&mut self) -> &mut Self
pub fn replace_data(&mut self) -> &mut Self
Replaces {{ data
Sourcepub fn replace_hash(&mut self) -> &mut Self
pub fn replace_hash(&mut self) -> &mut Self
Replaces {{ hash
Sourcepub fn prelude_type_id(&mut self) -> &mut Self
pub fn prelude_type_id(&mut self) -> &mut Self
Processes {{ def_type
Sourcepub fn replace_def_type(&mut self) -> &mut Self
pub fn replace_def_type(&mut self) -> &mut Self
Replaces {{ def_type
Sourcepub fn replace_ref_type(&mut self) -> &mut Self
pub fn replace_ref_type(&mut self) -> &mut Self
Replaces {{ ref_type
Sourcepub fn replace_all(&mut self) -> String
pub fn replace_all(&mut self) -> String
Chains all replacement operations and returns the final processed data.
Auto Trait Implementations§
impl Freeze for MockTxEmbed
impl RefUnwindSafe for MockTxEmbed
impl Send for MockTxEmbed
impl Sync for MockTxEmbed
impl Unpin for MockTxEmbed
impl UnwindSafe for MockTxEmbed
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