Todos os livros

Profissional

Apps Sobre Coach Entrar Começar a ler

Computer Science · Glossário

O que é Coherence, orphan rule?

Também chamado de: coherence (orphan rule)

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

Ler no capítulo →