Trait fadroma::composability::Composable
source · [−]pub trait Composable<S, A, Q>: BaseComposable<S, A, Q> {
fn set<Value: Serialize>(&mut self, key: &[u8], value: &Value) -> UsuallyOk;
fn set_ns<Value: Serialize>(
&mut self,
ns: &[u8],
key: &[u8],
value: &Value
) -> UsuallyOk;
fn set_multi_ns<Value: Serialize>(
&mut self,
ns: &[&[u8]],
key: &[u8],
value: &Value
) -> UsuallyOk;
fn get<Value: DeserializeOwned>(&self, key: &[u8]) -> Eventually<Value>;
fn get_ns<Value: DeserializeOwned>(
&self,
ns: &[u8],
key: &[u8]
) -> Eventually<Value>;
fn get_multi_ns<Value: DeserializeOwned>(
&self,
ns: &[&[u8]],
key: &[u8]
) -> Eventually<Value>;
fn remove(&mut self, key: &[u8]);
fn remove_ns(&mut self, ns: &[u8], key: &[u8]);
fn remove_multi_ns(&mut self, ns: &[&[u8]], key: &[u8]);
fn humanize<Value: Humanize>(
&self,
value: Value
) -> StdResult<Value::Output>;
fn canonize<Value: Canonize>(
&self,
value: Value
) -> StdResult<Value::Output>;
}
Required Methods
Uses a single slice as namespace and it combines it with the key
Uses an array of slices which are then combined according to the following spec: https://github.com/webmaster128/key-namespacing#nesting