Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Computer Science · Glosarium

Apa itu Coherence, orphan rule?

Dikenal juga sebagai: coherence (orphan rule)

Definition 8.2 University Computer Science — Year 2 · Bab 8 — Traits and Generics

Coherence requires that a program have at most one implementation of a given trait for a given type. Rust enforces it by the orphan rule: a crate may write impl Trait for Type only if the trait or the type is defined in that crate.

Baca dalam konteks →