inet.af/netstack@v0.0.0-20220214151720-7585b01ddccf/tcpip/buffer/buffer_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package buffer
     4  
     5  import (
     6  	"inet.af/netstack/state"
     7  )
     8  
     9  func (vv *VectorisedView) StateTypeName() string {
    10  	return "pkg/tcpip/buffer.VectorisedView"
    11  }
    12  
    13  func (vv *VectorisedView) StateFields() []string {
    14  	return []string{
    15  		"views",
    16  		"size",
    17  	}
    18  }
    19  
    20  func (vv *VectorisedView) beforeSave() {}
    21  
    22  // +checklocksignore
    23  func (vv *VectorisedView) StateSave(stateSinkObject state.Sink) {
    24  	vv.beforeSave()
    25  	stateSinkObject.Save(0, &vv.views)
    26  	stateSinkObject.Save(1, &vv.size)
    27  }
    28  
    29  func (vv *VectorisedView) afterLoad() {}
    30  
    31  // +checklocksignore
    32  func (vv *VectorisedView) StateLoad(stateSourceObject state.Source) {
    33  	stateSourceObject.Load(0, &vv.views)
    34  	stateSourceObject.Load(1, &vv.size)
    35  }
    36  
    37  func init() {
    38  	state.Register((*VectorisedView)(nil))
    39  }