// automatically generated by stateify. package buffer import ( "gvisor.dev/gvisor/pkg/state" ) func (b *buffer) StateTypeName() string { return "pkg/buffer.buffer" } func (b *buffer) StateFields() []string { return []string{ "data", "read", "write", "bufferEntry", } } func (b *buffer) beforeSave() {} func (b *buffer) StateSave(stateSinkObject state.Sink) { b.beforeSave() stateSinkObject.Save(0, &b.data) stateSinkObject.Save(1, &b.read) stateSinkObject.Save(2, &b.write) stateSinkObject.Save(3, &b.bufferEntry) } func (b *buffer) afterLoad() {} func (b *buffer) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &b.data) stateSourceObject.Load(1, &b.read) stateSourceObject.Load(2, &b.write) stateSourceObject.Load(3, &b.bufferEntry) } func (b *bufferList) StateTypeName() string { return "pkg/buffer.bufferList" } func (b *bufferList) StateFields() []string { return []string{ "head", "tail", } } func (b *bufferList) beforeSave() {} func (b *bufferList) StateSave(stateSinkObject state.Sink) { b.beforeSave() stateSinkObject.Save(0, &b.head) stateSinkObject.Save(1, &b.tail) } func (b *bufferList) afterLoad() {} func (b *bufferList) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &b.head) stateSourceObject.Load(1, &b.tail) } func (b *bufferEntry) StateTypeName() string { return "pkg/buffer.bufferEntry" } func (b *bufferEntry) StateFields() []string { return []string{ "next", "prev", } } func (b *bufferEntry) beforeSave() {} func (b *bufferEntry) StateSave(stateSinkObject state.Sink) { b.beforeSave() stateSinkObject.Save(0, &b.next) stateSinkObject.Save(1, &b.prev) } func (b *bufferEntry) afterLoad() {} func (b *bufferEntry) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &b.next) stateSourceObject.Load(1, &b.prev) } func (p *pool) StateTypeName() string { return "pkg/buffer.pool" } func (p *pool) StateFields() []string { return []string{ "bufferSize", "embeddedStorage", } } func (p *pool) beforeSave() {} func (p *pool) StateSave(stateSinkObject state.Sink) { p.beforeSave() stateSinkObject.Save(0, &p.bufferSize) stateSinkObject.Save(1, &p.embeddedStorage) } func (p *pool) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &p.bufferSize) stateSourceObject.LoadWait(1, &p.embeddedStorage) stateSourceObject.AfterLoad(p.afterLoad) } func (v *View) StateTypeName() string { return "pkg/buffer.View" } func (v *View) StateFields() []string { return []string{ "data", "size", "pool", } } func (v *View) beforeSave() {} func (v *View) StateSave(stateSinkObject state.Sink) { v.beforeSave() stateSinkObject.Save(0, &v.data) stateSinkObject.Save(1, &v.size) stateSinkObject.Save(2, &v.pool) } func (v *View) afterLoad() {} func (v *View) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &v.data) stateSourceObject.Load(1, &v.size) stateSourceObject.Load(2, &v.pool) } func init() { state.Register((*buffer)(nil)) state.Register((*bufferList)(nil)) state.Register((*bufferEntry)(nil)) state.Register((*pool)(nil)) state.Register((*View)(nil)) }