Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Computer Science · Glosarium

Apa itu Copy type?

Dikenal juga sebagai: copy type (Rust)

Definition 6.4 University Computer Science — Year 2 · Bab 6 — Rust: Ownership and Borrowing

A copy type is a type whose values are duplicated by copying their bytes, with no resource to free, and that implements the Copy trait: the integers, f64, bool, char, shared references, and tuples and arrays of copy types. For a copy type, assignment and passing by value copy, and the source stays usable. A type that owns a resource, such as String or Vec, cannot be Copy.

Baca dalam konteks →