OxL Reference

error explicit-interface

error Standard: [§4.6]

What it means#

An @explicit interface is satisfied only by an explicit impl I for T or by @derive(I) (§4.6); having methods of the right shape is not enough. Standard interfaces such as Copy, Drop and Serializable are explicit.

Example#

oxl✓ checked in CI
@explicit interface Persistent { fn key() -> str }

data Doc { id: u64 }

impl Doc {
  fn key() -> str => "doc"
}

assert Doc: Persistent      // <- explicit-interface
error
explicit-interface

How to fix#

oxl✓ checked in CI
@explicit interface Persistent { fn key() -> str }

data Doc { id: u64 }

impl Persistent for Doc {
  fn key() -> str => "doc"
}

assert Doc: Persistent

Write impl I for T { ... } (allowed when I or T is declared in your package) or add @derive(I) when the interface can be derived.

See also#

OxL 1.0.0-beta · Documentation version 1.0.0-beta© OxwaldLink · generated from the Standard, the std sources and the guides