pub struct BitfieldOperation {
pub op_type: BitfieldOpType,
pub encoding: BitfieldEncoding,
pub offset: u64,
pub value: i64,
pub overflow: BitfieldOverflow,
}Expand description
Bitfield operation instruction aligned with Apache Kvrocks BitfieldOperation. BITFIELD 操作指令(对标 Apache Kvrocks BitfieldOperation)
Fields§
§op_type: BitfieldOpType§encoding: BitfieldEncoding§offset: u64§value: i64§overflow: BitfieldOverflowImplementations§
Source§impl BitfieldOperation
impl BitfieldOperation
pub const fn get(encoding: BitfieldEncoding, offset: u64) -> Self
pub fn get_positional(encoding: BitfieldEncoding, index: u64) -> Result<Self>
pub const fn set( encoding: BitfieldEncoding, offset: u64, value: i64, overflow: BitfieldOverflow, ) -> Self
pub fn set_positional( encoding: BitfieldEncoding, index: u64, value: i64, overflow: BitfieldOverflow, ) -> Result<Self>
pub const fn incrby( encoding: BitfieldEncoding, offset: u64, increment: i64, overflow: BitfieldOverflow, ) -> Self
pub fn incrby_positional( encoding: BitfieldEncoding, index: u64, increment: i64, overflow: BitfieldOverflow, ) -> Result<Self>
Trait Implementations§
Source§impl Clone for BitfieldOperation
impl Clone for BitfieldOperation
Source§fn clone(&self) -> BitfieldOperation
fn clone(&self) -> BitfieldOperation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BitfieldOperation
Source§impl Debug for BitfieldOperation
impl Debug for BitfieldOperation
impl<'__de> Decode<'__de> for BitfieldOperationwhere
'__de:,
impl Encode for BitfieldOperation
impl Eq for BitfieldOperation
Source§impl PartialEq for BitfieldOperation
impl PartialEq for BitfieldOperation
impl StructuralPartialEq for BitfieldOperation
Auto Trait Implementations§
impl Freeze for BitfieldOperation
impl RefUnwindSafe for BitfieldOperation
impl Send for BitfieldOperation
impl Sync for BitfieldOperation
impl Unpin for BitfieldOperation
impl UnsafeUnpin for BitfieldOperation
impl UnwindSafe for BitfieldOperation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DecodeOwned for Twhere
T: for<'de> Decode<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.