pub enum PythonRuntime {
MicroPython,
CircuitPython,
}Expand description
Which interpreter a board’s console speaks.
Variants§
Implementations§
Source§impl PythonRuntime
impl PythonRuntime
Sourcepub fn interrupt_sequence(self) -> &'static [u8] ⓘ
pub fn interrupt_sequence(self) -> &'static [u8] ⓘ
The bytes that interrupt a running program, if the runtime can be
running one. CircuitPython starts code.py itself, so its REPL is busy
until Ctrl-C is sent; a stock MicroPython boot lands at the prompt with
nothing to interrupt.
Sourcepub fn entry_name(self) -> &'static str
pub fn entry_name(self) -> &'static str
The entry file the runtime executes on boot.
Sourcepub fn entry_candidates(self) -> &'static [&'static str]
pub fn entry_candidates(self) -> &'static [&'static str]
The entry names the runtime accepts, in preference order.
CircuitPython falls back to main.py when a project stages that name
instead, so a project choosing the MicroPython convention still runs.
Sourcepub fn raw_paste_begin(self) -> &'static [u8] ⓘ
pub fn raw_paste_begin(self) -> &'static [u8] ⓘ
Ctrl-A enters MicroPython’s raw REPL, where the interpreter does not echo or line-edit, so the pasted bytes arrive exactly as written.
Sourcepub fn raw_paste_end(self) -> &'static [u8] ⓘ
pub fn raw_paste_end(self) -> &'static [u8] ⓘ
Ctrl-D compiles and runs the raw paste. Both runtimes use the same framing; the parameter keeps the staging sequence one shape at the call site even though the bytes do not differ.
Trait Implementations§
Source§impl Clone for PythonRuntime
impl Clone for PythonRuntime
impl Copy for PythonRuntime
Source§impl Debug for PythonRuntime
impl Debug for PythonRuntime
impl Eq for PythonRuntime
Source§impl Hash for PythonRuntime
impl Hash for PythonRuntime
Source§impl PartialEq for PythonRuntime
impl PartialEq for PythonRuntime
impl StructuralPartialEq for PythonRuntime
Auto Trait Implementations§
impl Forget for PythonRuntime
impl Freeze for PythonRuntime
impl Move for PythonRuntime
impl RefUnwindSafe for PythonRuntime
impl Send for PythonRuntime
impl Sync for PythonRuntime
impl Unpin for PythonRuntime
impl UnsafeUnpin for PythonRuntime
impl UnwindSafe for PythonRuntime
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,
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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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