Expand description

Bit operations. Create bit operations used by client operate command. Offset orientation is left-to-right. Negative offsets are supported. If the offset is negative, the offset starts backwards from end of the bitmap. If an offset is out of bounds, a parameter error will be returned.

Nested CDT operations are supported by optional CTX context arguments. Example:

use aerospike::operations::bitwise::{resize, BitwiseResizeFlags, BitPolicy};
// bin = [[0b00000001, 0b01000010], [0b01011010]]
// Resize first bitmap (in a list of bitmaps) to 3 bytes.
resize("bin", 3, Some(BitwiseResizeFlags::Default), &BitPolicy::default());
// bin result = [[0b00000001, 0b01000010, 0b00000000], [0b01011010]]

Structs

  • BitPolicy determines the Bit operation policy.

Enums

  • CdtBitwiseOverflowActions specifies the action to take when bitwise add/subtract results in overflow/underflow.
  • CdtBitwiseResizeFlags specifies the bitwise operation flags for resize.
  • CdtBitwiseWriteFlags specify bitwise operation policy write flags.

Functions

  • Creates bit “add” operation. Server adds value to byte[] bin starting at bitOffset for bitSize. BitSize must be <= 64. Signed indicates if bits should be treated as a signed number. If add overflows/underflows, CdtBitwiseOverflowAction is used. Server does not return a value.
  • Creates bit “and” operation. Server performs bitwise “and” on value and byte[] bin at bitOffset for bitSize. Server does not return a value.
  • Creates bit “count” operation. Server returns integer count of set bits from byte[] bin starting at bitOffset for bitSize.
  • Creates bit “get” operation. Server returns bits from byte[] bin starting at bitOffset for bitSize.
  • Creates bit “get integer” operation. Server returns integer from byte[] bin starting at bitOffset for bitSize. Signed indicates if bits should be treated as a signed number.
  • Creates byte “insert” operation. Server inserts value bytes into byte[] bin at byteOffset. Server does not return a value.
  • Creates bit “left scan” operation. Server returns integer bit offset of the first specified value bit in byte[] bin starting at bitOffset for bitSize.
  • Creates bit “left shift” operation. Server shifts left byte[] bin starting at bitOffset for bitSize. Server does not return a value.
  • Creates bit “not” operation. Server negates byte[] bin starting at bitOffset for bitSize. Server does not return a value.
  • Creates bit “or” operation. Server performs bitwise “or” on value and byte[] bin at bitOffset for bitSize. Server does not return a value.
  • Creates byte “remove” operation. Server removes bytes from byte[] bin at byteOffset for byteSize. Server does not return a value.
  • Creates byte “resize” operation. Server resizes byte[] to byteSize according to resizeFlags. Server does not return a value.
  • Creates bit “right scan” operation. Server returns integer bit offset of the last specified value bit in byte[] bin starting at bitOffset for bitSize.
  • Creates bit “right shift” operation. Server shifts right byte[] bin starting at bitOffset for bitSize. Server does not return a value.
  • Creates bit “set” operation. Server sets value on byte[] bin at bitOffset for bitSize. Server does not return a value.
  • Creates bit “setInt” operation. Server sets value to byte[] bin starting at bitOffset for bitSize. Size must be <= 64. Server does not return a value.
  • Creates bit “subtract” operation. Server subtracts value from byte[] bin starting at bitOffset for bitSize. bit_size must be <= 64. Signed indicates if bits should be treated as a signed number. If add overflows/underflows, CdtBitwiseOverflowAction is used. Server does not return a value.
  • Creates bit “exclusive or” operation. Server performs bitwise “xor” on value and byte[] bin at bitOffset for bitSize. Server does not return a value.