Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Повторение

Основные возможности обобщений и полиморфизма в Rust.

// Copyright 2025 Google LLC
// SPDX-License-Identifier: Apache-2.0

pub struct HasGenerics<T>(...);

pub fn uses_traits<T: Debug>(input: T) {...}

pub trait TraitBounds: Clone {...}
This slide and its sub-slides should take about 74 minutes.
  • В этом разделе мы рассмотрим базовые концепции подхода Rust к полиморфизму — то, с чем вы чаще всего будете сталкиваться в повседневной работе.