FdbCompactLittleEndianUInt32Value
Namespace: FoundationDB.Client · struct
Implements: IFdbValue, ISpanEncodable, ISpanFormattable, IFormattable, IEquatable<FdbRawValue>, IEquatable<IFdbValue>, IEquatable<Slice>, IEquatable<ReadOnlySpan<byte>>, IEquatable<FdbCompactLittleEndianUInt32Value>
Value that wraps a 32-bit unsigned value, encoded in little-endian, using as few bytes as possible
Constructors
FdbCompactLittleEndianUInt32Value
FdbCompactLittleEndianUInt32Value(uint value)
Methods
Equals
bool Equals(object obj)
bool Equals(IFdbValue other)
bool Equals(FdbCompactLittleEndianUInt32Value other)
bool Equals(FdbRawValue other)
bool Equals(Slice other)
bool Equals(ReadOnlySpan<byte> other)
GetHashCode
int GetHashCode()
GetTypeHint
FdbValueTypeHint GetTypeHint()
Returns a hint on how to interpret this value
ToString
string ToString()
string ToString(string format, IFormatProvider formatProvider = null)
TryEncode
bool TryEncode(Span<byte> destination, out int bytesWritten)
Encodes this instance into its equivalent binary representation in the database
destination— Destination bufferbytesWritten— Number of bytes written to the buffer
Returns: true if the operation was successful and the buffer was large enough, or false if it was too small
TryFormat
bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider provider)
TryGetSizeHint
bool TryGetSizeHint(out int sizeHint)
Returns a quick estimate of the initial buffer size that would be large enough to encode this instance, in a single call to TryEncode
sizeHint— Receives an initial capacity that will satisfy almost all values. There is no guarantees that the size will be exact, and the estimate may be smaller or larger than the actual encoded size.
Returns: true if a size could be quickly computed; otherwise, false
TryGetSpan
bool TryGetSpan(out ReadOnlySpan<byte> span)
Returns the already encoded binary representation of the instance, if already available.
span— Points to the in-memory binary representation of the encoded key
Returns: true if the key has already been encoded, or it its in-memory layout is the same; otherwise, false
This is only intended to support pass-through or already encoded keys (via Slice), or when the binary representation has been cached to allow multiple uses.
Fields
Value
readonly uint Value
Integer value