pub struct CompileOptions {
pub assert_message_annotations: AssertMessageAnnotations,
pub source_scan_threshold: usize,
}Expand description
Options controlling how Monty behavior diverges from plain CPython.
Consumed when code is compiled: a MontyRun bakes the choices into the
program at construction, while a MontyRepl stores them so every snippet
fed to the session compiles the same way.
Fields§
§assert_message_annotations: AssertMessageAnnotationsGive failed assert statements pytest-style introspected messages,
deliberately diverging from CPython; see limitations/assert.md.
On by default with a 120-byte operand-repr truncation.
source_scan_threshold: usizeSources longer than this many bytes are scanned for parser nesting
before ruff sees them (see limitations/language.md); 0 scans every
source and usize::MAX none. Defaults to SOURCE_SCAN_THRESHOLD.
Trait Implementations§
Source§impl Clone for CompileOptions
impl Clone for CompileOptions
impl Copy for CompileOptions
Source§impl Debug for CompileOptions
impl Debug for CompileOptions
Source§impl Default for CompileOptions
impl Default for CompileOptions
Source§impl<'de> Deserialize<'de> for CompileOptions
impl<'de> Deserialize<'de> for CompileOptions
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 CompileOptions
impl RefUnwindSafe for CompileOptions
impl Send for CompileOptions
impl Sync for CompileOptions
impl Unpin for CompileOptions
impl UnsafeUnpin for CompileOptions
impl UnwindSafe for CompileOptions
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