pub enum BlockType {
Show 30 variants
SuspectedTypo {
found: Symbol,
suggestion: Symbol,
},
Theorem,
Main,
Definition,
Define,
Axiom,
Theory,
Proof,
Example,
Logic,
Note,
Function,
Component,
TypeDef,
Session,
Policy,
Requires,
Hardware,
Property,
No,
Tier,
Require,
Test {
name: Symbol,
},
Page {
path: Symbol,
},
Store,
Directive,
Route {
method: Symbol,
path: Symbol,
},
Middleware,
Redirect {
from: Symbol,
to: Symbol,
},
ErrorPage {
status: u16,
},
}Expand description
Document structure block type markers.
LOGOS uses markdown-style ## Header syntax to delimit different
sections of a program or proof document.
Variants§
SuspectedTypo
An unknown ## Header a small edit distance from a CONSEQUENTIAL
code header (## Mian → Main) — the parser fails loudly with the
suggestion instead of silently treating the whole block as prose.
Theorem
## Theorem - Declares a proposition to be proved.
Main
## Main - Program entry point for imperative code.
Definition
## Definition - Introduces new terminology or type definitions.
Define
## Define - Mints a vernacular-logic predicate definition that the
prover unfolds (Rung 0a). Distinct from ## Definition (type defs).
Axiom
## Axiom - Declares a named first-order axiom in formal notation
(## Axiom name: for all a b, Cong(a,b,b,a).). Its body is parsed by the
formal-formula parser and registered as a shared premise for later theorems —
the seam for an axiomatic base like Tarski geometry.
Theory
## Theory - Names a development that groups the ## Axioms and ## Theorems
that follow it (## Theory Tarski).
Proof
## Proof - Contains proof steps for a theorem.
Example
## Example - Illustrative examples.
Logic
## Logic - Direct logical notation input.
Note
## Note - Explanatory documentation.
Function
## To - Function definition block.
Component
## Component <Name> (props) - An LGX component: State:/Actions:/View:/
Style: sections lowered to a __mount_<Name>/__render_<Name> pair the runtime
drives through turns (an action runs, the view repaints, the DOM commits).
TypeDef
Inline type definition: ## A Point has: or ## A Color is one of:.
Session
## Session — the fields a visitor’s session carries between requests.
A RECORD, declared in the same words a record is (a user, which is Text.), which the
router loads from a signed cookie before dispatch and saves back when a route wrote to it.
Distinct from ## Store, which is shared state inside ONE running page: a session belongs
to a visitor and outlives the request, and lives on the server.
Policy
## Policy - Security policy rule definitions.
Requires
## Requires - External crate dependency declarations.
Hardware
## Hardware - Signal declarations for hardware verification.
Property
## Property - Temporal assertions for hardware verification.
No
## No - Optimization annotation (followed by Memo, TCO, Peephole, Borrow, or Optimize).
Tier
## Tier - Tiered-optimizer pin: ## Tier <opt> <eager|t1|t2|t3|never> overrides
the hotness tier at which that optimization runs (HOTSWAP §8).
Require
## Require <opt> - Optimization DEMAND: the inverse of ## No. Compilation
FAILS if the named optimization did not fire for this program (so a program
can declare it depends on an optimization, and losing it becomes an error).
Test
## Test: <prose sentence> - An independent test entry point with an
imperative body. The prose name is captured RAW at the lexer (never
tokenized as code) and carried on the header — it is the test’s
identity.
Page
## Page /path (params) — an LGX page component mounted at path. The path is
read RAW off the header line (a URL is not LOGOS words); the typed params that
follow lex normally.
Store
## Store <Name> [persisted as "key" | shared on "topic"] — a shared model.
Directive
## Directive <name> (el: Element) and (value: T): — a custom attribute behavior.
Route
## Route <METHOD> /path (params) -> T: — a typed HTTP route; method and path are
read RAW off the header line, the params and return type lex normally.
Middleware
## Before each request (r: Request) -> Option of Response: — middleware.
Redirect
## Redirect /from -> /to. — both paths read raw; the whole line is the header.
ErrorPage
## Error page <status> — the view served for an HTTP error status.
Trait Implementations§
impl Copy for BlockType
impl Eq for BlockType
impl StructuralPartialEq for BlockType
Auto Trait Implementations§
impl Freeze for BlockType
impl RefUnwindSafe for BlockType
impl Send for BlockType
impl Sync for BlockType
impl Unpin for BlockType
impl UnsafeUnpin for BlockType
impl UnwindSafe for BlockType
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<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.