FIND YOUR NEXT FEW LINES

Results for “Rust”

Small, practical examples. Search by task or narrow things down below.

142 snippets foundClear filters
RustGetting Started

Compile and run your first Rust program

Compile and run your first Rust program in a complete Rust program using the standard library.

Rust✓ Tested
AngularAccessibility & reusable patterns

Display untrusted-looking text without HTML execution

Display untrusted-looking text without HTML execution with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Bash ScriptsFunction scope & composition

Load functions from a trusted local script

Bash Scripts: Source executes a file in the current shell so its function definitions remain available.

Bash Scripts✓ Tested
PowerShellStructured formats & encodings

Read a value from a trusted XML document

PowerShell: The XML adapter exposes a small document’s elements and attributes through named properties.

PowerShell✓ Tested
PythonStructured data & serialization

Read elements from trusted XML

Python: Use ElementTree to inspect a small trusted XML document.

Python✓ Tested
ReactAccessibility & events

Render untrusted-looking input as literal text

Render untrusted-looking input as literal text with a small React component and explicit browser behavior.

React✓ Tested
RustFunctions & data types

Accept different types with a generic function

Accept different types with a generic function in a complete Rust program using the standard library.

Rust✓ Tested
RustIterators & transformations

Accumulate a result with fold

Accumulate a result with fold in a complete Rust program using the standard library.

Rust✓ Tested
RustErrors & optional values

Add context to a parsing failure

Add context to a parsing failure in a complete Rust program using the standard library.

Rust✓ Tested
RustVectors & slices

Append several values to a vector

Append several values to a vector in a complete Rust program using the standard library.

Rust✓ Tested
RustFiles & paths

Append to a file without truncating it

Append to a file without truncating it in a complete Rust program using the standard library.

Rust✓ Tested
RustTesting & reusable patterns

Assert approximate floating-point equality

Assert approximate floating-point equality in a complete Rust program using the standard library.

Rust✓ Tested