pub struct PlaygroundConfig {
pub wasm_enabled: bool,
pub real_time_execution: bool,
pub syntax_highlighting: bool,
pub auto_completion: bool,
pub error_highlighting: bool,
pub available_crates: Vec<String>,
pub example_count: usize,
pub trait_count: usize,
pub type_count: usize,
}Expand description
Configuration for playground generation
Fields§
§wasm_enabled: boolEnable WebAssembly compilation
real_time_execution: boolEnable real-time code execution
syntax_highlighting: boolEnable syntax highlighting
auto_completion: boolEnable auto-completion
error_highlighting: boolEnable error highlighting
available_crates: Vec<String>Available crates for import
example_count: usizeNumber of examples available
trait_count: usizeNumber of traits documented
type_count: usizeNumber of types documented
Implementations§
Source§impl PlaygroundConfig
impl PlaygroundConfig
Sourcepub fn with_real_time_execution(self, enabled: bool) -> Self
pub fn with_real_time_execution(self, enabled: bool) -> Self
Enable or disable real-time execution
Sourcepub fn with_syntax_highlighting(self, enabled: bool) -> Self
pub fn with_syntax_highlighting(self, enabled: bool) -> Self
Enable or disable syntax highlighting
Sourcepub fn with_auto_completion(self, enabled: bool) -> Self
pub fn with_auto_completion(self, enabled: bool) -> Self
Enable or disable auto-completion
Sourcepub fn with_error_highlighting(self, enabled: bool) -> Self
pub fn with_error_highlighting(self, enabled: bool) -> Self
Enable or disable error highlighting
Sourcepub fn with_available_crates(self, crates: Vec<String>) -> Self
pub fn with_available_crates(self, crates: Vec<String>) -> Self
Set available crates for import
Sourcepub fn with_stats(
self,
example_count: usize,
trait_count: usize,
type_count: usize,
) -> Self
pub fn with_stats( self, example_count: usize, trait_count: usize, type_count: usize, ) -> Self
Update statistics
Trait Implementations§
Source§impl Clone for PlaygroundConfig
impl Clone for PlaygroundConfig
Source§fn clone(&self) -> PlaygroundConfig
fn clone(&self) -> PlaygroundConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlaygroundConfig
impl Debug for PlaygroundConfig
Source§impl Default for PlaygroundConfig
impl Default for PlaygroundConfig
Source§impl<'de> Deserialize<'de> for PlaygroundConfig
impl<'de> Deserialize<'de> for PlaygroundConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PlaygroundConfig
impl RefUnwindSafe for PlaygroundConfig
impl Send for PlaygroundConfig
impl Sync for PlaygroundConfig
impl Unpin for PlaygroundConfig
impl UnwindSafe for PlaygroundConfig
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<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