github.com/ipld/go-ipld-prime@v0.21.0/adl/interface.go (about) 1 package adl 2 3 import ( 4 "github.com/ipld/go-ipld-prime/datamodel" 5 ) 6 7 // ADL is an interface denoting an Advanced Data Layout, 8 // which is something that supports all the datamodel.Node operations, 9 // but may be doing so using some custom internal logic. 10 // 11 // For more details, see the docs at 12 // https://ipld.io/docs/advanced-data-layouts/ . 13 // 14 // This interface doesn't specify much new behavior, but it does include 15 // the requirement of a way to tell an examiner about your "substrate", 16 // since this concept does seem to be present in all ADLs. 17 type ADL interface { 18 datamodel.Node 19 20 // Substrate returns the underlying Data Model node, which can be used 21 // to encode an ADL's raw layout. 22 // 23 // Note that the substrate of an ADL can contain other ADLs! 24 Substrate() datamodel.Node 25 }