Skip to main content

Crate aranya_policy_ast

Crate aranya_policy_ast 

Source
Expand description

The Aranya Policy Language’s AST.

See the policy book for more information on the policy language.

Modules§

thir
Typed High-level Intermediate Representation

Macros§

ident
Creates an Identifier from a string literal.
text
Creates a Text from a string literal.

Structs§

ActionDefinition
An action definition
ArchivedFactDefinition
An archived FactDefinition
ArchivedFieldDefinition
An archived FieldDefinition
ArchivedIdent
An archived Ident
ArchivedParam
An archived Param
ArchivedResultTypeKind
An archived ResultTypeKind
ArchivedVType
An archived VType
CheckStatement
Check that a boolean expression is true, and fail otherwise
CommandDefinition
A command definition
CreateStatement
Create a fact
DeleteStatement
Delete a fact
EffectDefinition
An effect definition
EffectFieldDefinition
An identifier and its type and dynamic effect marker
EnumDefinition
Enumeration definition
EnumReference
A reference to an enumeration, e.g. Color::Red.
Expression
All of the things which can be in an expression.
FactDefinition
A schema definition for a fact
FactDefinitionResolver
The resolver for an archived FactDefinition
FactLiteral
A fact and its key/value field values.
FieldDefinition
An identifier and its type
FieldDefinitionResolver
The resolver for an archived FieldDefinition
FinishFunctionDefinition
A finish function definition. This is slightly different than a regular function since it cannot return values and can only execute finish block statements.
ForeignFunctionCall
A foreign function call with a list of arguments.
FunctionCall
A function call with a list of arguments.
FunctionDecl
Encapsulates both FunctionDefinition and FinishFunctionDefinition for the purpose of parsing FFI function declarations.
FunctionDefinition
A function definition
GlobalLetStatement
A globally scopped let statement
Ident
An identifier.
IdentResolver
The resolver for an archived Ident
Identifier
A textual identifier which matches [a-zA-Z][a-zA-Z0-9_]*.
IfStatement
Test a series of conditions and execute the statements for the first true condition.
InvalidIdentifier
Not a valid Identifier value.
InvalidText
Not a valid Text value.
InvalidVersion
An invalid version string was provided to Version::from_str.
LetStatement
Define a variable with an expression
MapStatement
Iterate over the results of a query, and execute some statements for each one.
MatchArm
One arm of a match statement
MatchExpression
Match statement expression
MatchExpressionArm
Match arm expression
MatchStatement
Match a value and execute one possibility out of many
NamedStruct
A named struct literal
Param
An action or function parameter.
ParamResolver
The resolver for an archived Param
Policy
The policy AST root
ResultTypeKind
Result type kind
ResultTypeKindResolver
The resolver for an archived ResultTypeKind
ReturnStatement
Return from a function
Span
A range in the source text.
Statement
Statements in the policy language. Not all statements are valid in all contexts.
StructDefinition
A struct definition
Text
A string-like value which is utf8 without nul bytes.
UpdateStatement
Update a fact
VType
The type of a value
VTypeResolver
The resolver for an archived VType

Enums§

ArchivedPersistence
An archived Persistence
ArchivedTypeKind
An archived TypeKind The archived kind of a VType.
ExprKind
The kind of Expression.
FactCountType
How many facts to expect when counting
FactField
Value part of a key/value pair for a fact field.
InternalFunction
Expression atoms with special rules or effects.
LanguageContext
A container for a statement or expression
MatchPattern
Match arm pattern
Persistence
Persistence mode for commands and actions
PersistenceResolver
The resolver for an archived Persistence
ResultPattern
Result pattern for matching Ok(x) or Err(e)
StmtKind
The kind of Statement.
StructItem
Struct field or insertion reference
TypeKind
The kind of a VType.
TypeKindResolver
The resolver for an archived TypeKind
Version
Policy language version

Traits§

Spanned
A trait for types that can provide a source span.