pub struct LatexInput { /* fields omitted */ }
The latex input provides the needed files
as tuple vector with name, buffer as tuple.
Add a single input tuple.
fn main() {
let mut input = LatexInput::new();
input.add("name.tex", "test".as_bytes().to_vec());
}
Add a single file as input.
fn main() {
let mut input = LatexInput::from("assets/main.tex");
input.add("name.tex", "test".as_bytes().to_vec());
}
If the path is not a file or can't be converted to a string nothing is added and ok is returned.
Add a whole folder as input.
fn main() {
let mut input = LatexInput::from("assets");
input.add("name.tex", "test".as_bytes().to_vec());
}
If the path is not a folder nothing is added.
Provide a simple From conversion for &str to latex input.
If neither a valid file nor a folder an empty input struct is returned.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)