MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / verify

Method verify

projects/JavaScript/proto/enums.js:7599–7611  ·  view source on GitHub ↗

* Check if the struct value is valid * @this {!EnumsFinalModel} * @returns {!boolean} Model valid state

()

Source from the content-addressed store, hash-verified

7597 * @returns {!boolean} Model valid state
7598 */
7599 verify () {
7600 if ((this.buffer.offset + this._model.fbeOffset) > this.buffer.size) {
7601 return false
7602 }
7603
7604 let fbeStructSize = this.readUInt32(this._model.fbeOffset - 8)
7605 let fbeStructType = this.readUInt32(this._model.fbeOffset - 4)
7606 if ((fbeStructSize <= 0) || (fbeStructType !== this.fbeType)) {
7607 return false
7608 }
7609
7610 return ((8 + this._model.verify()) === fbeStructSize)
7611 }
7612
7613 /**
7614 * Serialize the struct value

Callers

nothing calls this directly

Calls 2

readUInt32Method · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected