Skip to main content

buffer_transfer

Function buffer_transfer 

Source
pub fn buffer_transfer(
    ab: &Value,
    args: &[Value],
    fixed: bool,
) -> Result<Value, String>
Expand description

ArrayBuffer.prototype.transfer([newLength]) and transferToFixedLength.

A fresh buffer takes the bytes — truncated or zero-padded to newLength — and the receiver is detached. The two differ only in whether the result may still grow.