Skip to content
masterclass Buddy

Rust · Trait

Into

Into converts an owned value into another value and consumes the input. Use Into in generic bounds; implement From instead when defining conversions.

Last updated

Since
1.0.0

Syntax

pub trait Into<T>: Sized {
    fn into(self) -> T;
}

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • From
  • TryInto
  • TryFrom
  • AsRef
  • AsMut

Source: Into in std::convert - Rust. Checked 2026-11-03.