Glossary coding Term Page

Slice

A borrowed view into part of an existing value

slice #rust#string#borrowing
Korean version

Aliases

borrowed slicestring slice

Prerequisites

Related Concepts

Core Idea

A slice is a borrowed view into part of existing data instead of a full copy. Rust's &str and &[T] are the standard examples, and they teach the habit of using only the portion you need.

Why It Matters Here

Mathbong uses slices to connect string handling, partial collection access, and lifetime reasoning. They are the most concrete example of reference rules applied to real data segments.

Posts Mentioning This Concept