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

Method ImplementInterfaceUnchecked

dagql/objects.go:66–74  ·  view source on GitHub ↗

ImplementInterfaceUnchecked declares interface conformance without performing the dagql structural Satisfies check. Use this when a higher-level type system (e.g. core's IsSubtypeOf) has already validated conformance.

(iface *Interface)

Source from the content-addressed store, hash-verified

64// the dagql structural Satisfies check. Use this when a higher-level type system
65// (e.g. core's IsSubtypeOf) has already validated conformance.
66func (class Class[T]) ImplementInterfaceUnchecked(iface *Interface) {
67 class.fieldsL.Lock()
68 class.interfaces[iface.TypeName()] = iface
69 class.fieldsL.Unlock()
70 iface.addImplementor(class.TypeName())
71 if class.invalidateSchemaCache != nil {
72 class.invalidateSchemaCache()
73 }
74}
75
76type ClassOpts[T Typed] struct {
77 // NoIDs disables the default "id" field and disables the IDType method.

Callers

nothing calls this directly

Calls 4

TypeNameMethod · 0.95
addImplementorMethod · 0.80
invalidateSchemaCacheMethod · 0.80
TypeNameMethod · 0.65

Tested by

no test coverage detected