pub enum CodeLanguage {
PlainText,
Rust,
Toml,
Json,
Markdown,
Shell,
TypeScript,
JavaScript,
}Expand description
Options that control code language behavior.
Variants§
PlainText
Treats code content as plain text without language-specific highlighting.
Rust
Treats code content as Rust source for labeling and highlighting.
Toml
Treats code content as TOML configuration.
Json
Reports a json failure.
Markdown
Treats code content as Markdown prose.
Shell
Treats code content as shell commands.
TypeScript
Treats code content as TypeScript source.
JavaScript
Treats code content as JavaScript source.
Implementations§
Source§impl CodeLanguage
impl CodeLanguage
Trait Implementations§
Source§impl Clone for CodeLanguage
impl Clone for CodeLanguage
Source§fn clone(&self) -> CodeLanguage
fn clone(&self) -> CodeLanguage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CodeLanguage
Source§impl Debug for CodeLanguage
impl Debug for CodeLanguage
impl Eq for CodeLanguage
Source§impl From<&str> for CodeLanguage
impl From<&str> for CodeLanguage
Source§impl From<String> for CodeLanguage
impl From<String> for CodeLanguage
Source§impl Hash for CodeLanguage
impl Hash for CodeLanguage
Source§impl PartialEq for CodeLanguage
impl PartialEq for CodeLanguage
Source§fn eq(&self, other: &CodeLanguage) -> bool
fn eq(&self, other: &CodeLanguage) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CodeLanguage
Auto Trait Implementations§
impl Freeze for CodeLanguage
impl RefUnwindSafe for CodeLanguage
impl Send for CodeLanguage
impl Sync for CodeLanguage
impl Unpin for CodeLanguage
impl UnsafeUnpin for CodeLanguage
impl UnwindSafe for CodeLanguage
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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