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

Method set

projects/JavaScript/proto/enums.js:453–461  ·  view source on GitHub ↗

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

(value)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

writeUInt8Method · 0.80

Tested by

no test coverage detected