pub enum StudioMode {
Logic,
Code,
Math,
Hardware,
Web,
}Expand description
The active mode in the Studio playground.
Variants§
Logic
English to First-Order Logic translation (default)
Code
Vernacular REPL for proof development and .logos files
Math
Visual formula builder with LaTeX preview
Hardware
English hardware specs to SystemVerilog Assertions with in-browser, kernel-certified proving (no Z3 in the bundle).
Web
A LOGOS page (## Page) compiled to wasm in-browser and rendered LIVE in a
sandboxed iframe — edit the page’s source and see it run.
Implementations§
Source§impl StudioMode
impl StudioMode
Sourcepub const ALL: [StudioMode; 5]
pub const ALL: [StudioMode; 5]
Every mode, in display order.
Sourcepub fn for_path(path: &str) -> Option<Self>
pub fn for_path(path: &str) -> Option<Self>
The mode a Studio file opens in. The Studio has no mode switch — opening a file is choosing its mode — so this is the one place a path becomes a mode.
The extension names the mode, except for .logos: it is the source language of
Code, Math and Web alike, so a math/ or web/ folder decides which. None is a
file with no LOGOS extension; the Studio keeps its current mode for it.
Sourcepub fn display_name(&self) -> &'static str
pub fn display_name(&self) -> &'static str
Returns the display name for this mode.
Sourcepub fn for_logos_source(source: &str) -> Self
pub fn for_logos_source(source: &str) -> Self
The mode a .logos source opens in: a file that declares a ## Page is a web page and
opens in the Web tab, where it runs live; any other program opens in Code. The header is read
by the real lexer, so a page is recognised exactly when the compiler would mount one.
Sourcepub fn for_file(path: &str, text: &str) -> Option<Self>
pub fn for_file(path: &str, text: &str) -> Option<Self>
The mode a file opens in once its text is known — the one rule the file browser and the
Studio’s opening share. The path decides (Self::for_path); a .logos file the path
leaves to Code opens in Web when it declares a page (Self::for_logos_source). None is
a file with no LOGOS extension.
Sourcepub fn from_extension(ext: &str) -> Option<Self>
pub fn from_extension(ext: &str) -> Option<Self>
Infer mode from file extension.
Trait Implementations§
Source§impl Clone for StudioMode
impl Clone for StudioMode
Source§fn clone(&self) -> StudioMode
fn clone(&self) -> StudioMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StudioMode
impl Debug for StudioMode
Source§impl Default for StudioMode
impl Default for StudioMode
Source§fn default() -> StudioMode
fn default() -> StudioMode
Source§impl PartialEq for StudioMode
impl PartialEq for StudioMode
impl Copy for StudioMode
impl Eq for StudioMode
impl StructuralPartialEq for StudioMode
Auto Trait Implementations§
impl Freeze for StudioMode
impl RefUnwindSafe for StudioMode
impl Send for StudioMode
impl Sync for StudioMode
impl Unpin for StudioMode
impl UnsafeUnpin for StudioMode
impl UnwindSafe for StudioMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.