Alle boeken

Professioneel

Apps Over Coach Inloggen Begin met lezen

Computer Science · Begrippenlijst

Wat is Coherence, orphan rule?

Ook bekend als: coherence (orphan rule)

Definition 8.2 University Computer Science — Year 2 · Hoofdstuk 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.

Lees in het hoofdstuk →