graph/encoding: rename decoding API in encoding package

This commit is contained in:
kortschak
2017-08-04 08:57:17 +09:30
committed by Dan Kortschak
parent 8e3d6da27f
commit 4d30eb012e
3 changed files with 36 additions and 40 deletions

View File

@@ -16,11 +16,10 @@ type Builder interface {
NewEdge(from, to graph.Node) graph.Edge
}
// UnmarshalerAttr is implemented by types that can unmarshal a graph
// attribute description of themselves.
type UnmarshalerAttr interface {
// UnmarshalAttr decodes a single attribute.
UnmarshalAttr(attr Attribute) error
// AttributeSetter is implemented by types that can set an encoded graph
// attribute.
type AttributeSetter interface {
SetAttribute(Attribute) error
}
// Attributer defines graph.Node or graph.Edge values that can