Trait skytable::types::IntoSkyhashBytes
source · [−]Expand description
Anything that implements this trait can be turned into a String
. This trait is implemented
for most primitive types by default using std
’s ToString
trait.
Implementing this trait
A trivial example:
use skytable::types::{IntoSkyhashBytes};
struct MyStringWrapper(String);
impl IntoSkyhashBytes for MyStringWrapper {
fn as_bytes(&self) -> Vec<u8> {
self.0.as_bytes().to_owned()
}
}