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

Method set

projects/JavaScript/proto/test.js:454–462  ·  view source on GitHub ↗

* Set the value * @this {!FieldModelEnumTyped} * @param {!EnumTyped} value Value * @returns {!number} Final model size

(value)

Source from the content-addressed store, hash-verified

452 * @returns {!number} Final model size
453 */
454 set (value) {
455 console.assert(((this._buffer.offset + this.fbeOffset + this.fbeSize) <= this._buffer.size), 'Model is broken!')
456 if ((this._buffer.offset + this.fbeOffset + this.fbeSize) > this._buffer.size) {
457 return 0
458 }
459
460 this.writeUInt8(this.fbeOffset, value.value)
461 return this.fbeSize
462 }
463}
464
465exports.FinalModelEnumTyped = FinalModelEnumTyped

Callers

nothing calls this directly

Calls 1

writeUInt8Method · 0.80

Tested by

no test coverage detected