public bool TrySet(byte *value, int valueLength) { if (valueLength <= Length) { return(false); } BufferInternal.MemoryCopy(value, _data, _length, valueLength); return(true); }
public bool TryCopyTo(ByteSpan buffer) { if (Length > buffer.Length) { return(false); } BufferInternal.MemoryCopy(UnsafeBuffer, buffer.UnsafeBuffer, buffer.Length, Length); return(true); }
public bool TryCopyTo(byte *value, int valueLength) { if (Length > valueLength) { return(false); } BufferInternal.MemoryCopy(_data, value, valueLength, _length); return(true); }
public bool TryCopyTo(ByteSpan dest) { if (Length > dest.Length) { return(false); } BufferInternal.MemoryCopy(_data, dest._data, dest.Length, _length); return(true); }
public void Set(byte *value, int valueLength) { Precondition.Require(valueLength <= Length); BufferInternal.MemoryCopy(value, _data, _length, valueLength); }
public bool Equals(ByteSpan buffer) { return(BufferInternal.MemoryEqual(_data, _length, buffer._data, buffer._length)); }