[−][src]Struct tarantool_module::tuple::KeyDef
Implementations
impl KeyDef[src]
pub fn new(items: Vec<KeyDefItem>) -> Self[src]
Create key definition with key fields with passed typed on passed positions. May be used for tuple format creation and/or tuple comparison.
items- array with key field identifiers and key field types (see FieldType)
pub fn compare(&self, tuple_a: &Tuple, tuple_b: &Tuple) -> Ordering[src]
Compare tuples using the key definition.
tuple_a- first tupletuple_b- second tuple
Returns:
Ordering::Equalifkey_fields(tuple_a) == key_fields(tuple_b)Ordering::Lessifkey_fields(tuple_a) < key_fields(tuple_b)Ordering::Greaterifkey_fields(tuple_a) > key_fields(tuple_b)
pub fn compare_with_key<K>(&self, tuple: &Tuple, key: &K) -> Ordering where
K: AsTuple, [src]
K: AsTuple,
Compare tuple with key using the key definition.
tuple- tuplekey- key with MessagePack array header
Returns:
Ordering::Equalifkey_fields(tuple) == parts(key)Ordering::Lessifkey_fields(tuple) < parts(key)Ordering::Greaterifkey_fields(tuple) > parts(key)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for KeyDef
impl !Send for KeyDef
impl !Sync for KeyDef
impl Unpin for KeyDef
impl UnwindSafe for KeyDef
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,