MCPcopy Create free account
hub / github.com/dagger/dagger / ImplementInterface

Method ImplementInterface

dagql/interfaces.go:398–406  ·  view source on GitHub ↗

ImplementInterface declares that this interface implements another interface. This is the interface-to-interface equivalent of Class.Implements.

(other *Interface)

Source from the content-addressed store, hash-verified

396// ImplementInterface declares that this interface implements another interface.
397// This is the interface-to-interface equivalent of Class.Implements.
398func (iface *Interface) ImplementInterface(other *Interface) {
399 iface.relationsL.Lock()
400 iface.interfaces[other.TypeName()] = other
401 iface.relationsL.Unlock()
402
403 // Also register this interface as an implementor of the other interface,
404 // so possibleTypes includes it.
405 other.addImplementor(iface.name)
406}
407
408// Implementors returns a snapshot of the type names that implement this interface.
409func (iface *Interface) Implementors() map[string]struct{} {

Callers

nothing calls this directly

Calls 2

addImplementorMethod · 0.80
TypeNameMethod · 0.65

Tested by

no test coverage detected