Struct aerospike::Key [−][src]
pub struct Key { pub namespace: String, pub set_name: String, pub user_key: Option<Value>, pub digest: [u8; 20], }
Unique record identifier. Records can be identified using a specified namespace, an optional set name and a user defined key which must be uique within a set. Records can also be identified by namespace/digest, which is the combination used on the server.
Fields
namespace: String
Namespace.
set_name: String
Set name.
user_key: Option<Value>
Original user key.
digest: [u8; 20]
Unique server hash value generated from set name and user key.
Methods
impl Key
[src]
impl Key
pub fn new<S>(namespace: S, set_name: S, key: Value) -> Result<Self> where
S: Into<String>,
[src]
pub fn new<S>(namespace: S, set_name: S, key: Value) -> Result<Self> where
S: Into<String>,
Construct a new key given a namespace, a set name and a user key value.
Panics
Only integers, strings and blobs (Vec<u8>
) can be used as user keys. The constructor will
panic if any other value type is passed.
Trait Implementations
impl Debug for Key
[src]
impl Debug for Key
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Key
[src]
impl Clone for Key
fn clone(&self) -> Key
[src]
fn clone(&self) -> Key
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for Key
[src]
impl PartialEq for Key
fn eq(&self, other: &Key) -> bool
[src]
fn eq(&self, other: &Key) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Key) -> bool
[src]
fn ne(&self, other: &Key) -> bool
This method tests for !=
.
impl Display for Key
[src]
impl Display for Key