Struct katex::OptsBuilder [−][src]
Builder for Opts
.
Implementations
impl OptsBuilder
[src]
pub fn display_mode<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
[src]
Whether to render the math in the display mode.
pub fn output_type<VALUE: Into<OutputType>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
KaTeX output type.
pub fn leqno<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
[src]
Whether to have \tags
rendered on the left instead of the right.
pub fn fleqn<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
[src]
Whether to make display math flush left.
pub fn throw_on_error<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
[src]
Whether to let KaTeX throw a ParseError for invalid LaTeX.
pub fn error_color<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
Color used for invalid LaTeX.
pub fn macros<VALUE: Into<HashMap<String, String>>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Collection of custom macros. Read https://katex.org/docs/options.html for more information.
pub fn min_rule_thickness<VALUE: Into<f64>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Specifies a minimum thickness, in ems. Read https://katex.org/docs/options.html for more information.
pub fn max_size<VALUE: Into<Option<f64>>>(&mut self, value: VALUE) -> &mut Self
[src]
Max size for user-specified sizes.
If set to None
, users can make elements and spaces arbitrarily large.
Read https://katex.org/docs/options.html for more information.
pub fn max_expand<VALUE: Into<Option<i32>>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Limit the number of macro expansions to the specified number.
If set to None
, the macro expander will try to fully expand as in LaTeX.
Read https://katex.org/docs/options.html for more information.
pub fn trust<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
[src]
Whether to trust users' input.
Cannot be assigned at the same time with OptsBuilder::trust_callback
.
Read https://katex.org/docs/options.html for more information.
pub fn trust_callback<VALUE: Into<TrustCallback>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
A callback function to determine whether to trust users' input.
Cannot be assigned at the same time with OptsBuilder::trust
.
Read https://katex.org/docs/options.html for more information.
Examples
let opts = katex::Opts::builder() .trust_callback(|ctx: katex::TrustContext| -> bool { ctx.command == r#"\url"# }) .build() .unwrap();
pub fn build(&self) -> Result<Opts, String>
[src]
impl OptsBuilder
[src]
Trait Implementations
impl Clone for OptsBuilder
[src]
fn clone(&self) -> OptsBuilder
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for OptsBuilder
[src]
fn default() -> OptsBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for OptsBuilder
[src]
impl !Send for OptsBuilder
[src]
impl !Sync for OptsBuilder
[src]
impl Unpin for OptsBuilder
[src]
impl UnwindSafe for OptsBuilder
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,