Skip to content

Instantly share code, notes, and snippets.

@ProgramCrafter
Created June 15, 2026 18:54
Show Gist options
  • Select an option

  • Save ProgramCrafter/9a502bc03298e949cac85875d8b9427c to your computer and use it in GitHub Desktop.

Select an option

Save ProgramCrafter/9a502bc03298e949cac85875d8b9427c to your computer and use it in GitHub Desktop.
Form of Rust code tree to be inputted by voice or read aloud.
Rust to speech file
without shebang
with attribute sequence
inner built-in documentation attribute of name-value syntax
name doc
value raw literal string """Player identifier infrastructure"""
end sequence
with item sequence
import source-available items
nested under path prefix serde
using sequence
simple path Deserialize
simple path Serialize
end sequence
declare public exhaustive enumeration
with attribute sequence
outer built-in documentation attribute of name-value syntax
name doc
value raw literal string """The selector for players which can access a certain feature or place."""
outer built-in derivation attribute of list syntax
name derive
containing path sequence
simple path Clone
simple path Copy
simple path Deserialize
simple path Serialize
simple path PartialEq
simple path Eq
simple path Hash
simple path Debug
end sequence
end sequence
named SideWanted
without generics
without clauses
to have variant sequence
variant
with attribute sequence
outer built-in documentation attribute of name-value syntax
name doc
value raw literal string """Matches [`Side::A`] (player A) only."""
end sequence
named A
without special variant kind
variant
with attribute sequence
outer built-in documentation attribute of name-value syntax
name doc
value raw literal string """Matches [`Side::B`] (player B) only. Should not occur in local games."""
end sequence
named B
without special variant kind
variant
with attribute sequence
outer built-in documentation attribute of name-value syntax
name doc
value raw literal string """Matches both players."""
end sequence
named Any
without special variant kind
variant
with attribute sequence
outer built-in documentation attribute of name-value syntax
name doc
value raw literal string """Matches no players."""
end sequence
named Nil
without special variant kind
exhausted enumeration variants end sequence
declare public exhaustive enumeration
with attribute sequence
outer built-in documentation attribute of name-value syntax
name doc
value raw literal string """Player's identifier. It is not copiable to avoid accidental usage of a wrong"""
outer built-in documentation attribute of name-value syntax
name doc
value raw literal string """identifier, in contrast to [`SideWanted`]."""
outer built-in derivation attribute of list syntax
name derive
containing path sequence
simple path Deserialize
simple path Serialize
end sequence
end sequence
named Side
without generics
without clauses
to have variant sequence
variant
with attribute sequence
outer built-in documentation attribute of name-value syntax
name doc
value raw literal string """Player A."""
end sequence
named A
without special variant kind
variant
with attribute sequence
outer built-in documentation attribute of name-value syntax
name doc
value raw literal string """Player B. Should not occur in local games."""
end sequence
named B
without special variant kind
exhausted enumeration variants end sequence
provide inherent implementation
without generics
on type with path SideWanted
without clauses
of item sequence
declare public associated function
with attribute sequence
outer built-in documentation attribute of name-value syntax
name doc
value raw literal string """Test if actor matches the selector and is allowed to access some place."""
end sequence
non-const non-async default safety default ABI
named accepts
without generics
with parameter sequence
shorthand self parameter owned immutably
parameter irrefutably binding
without dereference with immutable binding
to name actor
without bound pattern constraint
a value of shared reference type
with elided lifetime
to path Side
end sequence
returning a value of type with path bool
without clauses
to be a code block containing statement sequence
tail expression invoking macro
at path matches
with token tree """(self, actor), (Self::A, Side::A) | (Self::B, Side::B) | (Self::Any, _)"""
end sequence
end sequence
provide inherent implementation
without generics
on type with path Side
without clauses
of item sequence
declare public associated function
with attribute sequence
outer built-in documentation attribute of name-value syntax
name doc
value raw literal string """Selector to allow only this player (not the other) to access some place."""
end sequence
non-const non-async default safety default ABI
named matchers
without generics
with parameter sequence
shorthand self parameter
by shared reference with elided lifetime
end sequence
returning a value of type with path SideWanted
without clauses
to be a code block containing statement sequence
tail expression matching variable with path self
arm with path pattern defined by segment sequence
self segment without generics
simple segment A without generics
end sequence
without match guard
to path expression defined by segment sequence
simple segment SideWanted without generics
simple segment A without generics
end sequence
comma-terminated
arm with path pattern defined by segment sequence
self segment without generics
simple segment B without generics
end sequence
without match guard
to path expression defined by segment sequence
simple segment SideWanted without generics
simple segment B without generics
end sequence
comma-terminated
end sequence
end sequence
end sequence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment