pub trait IntoSkyhashBytes: Send + Sync {
    fn as_bytes(&self) -> Vec<u8>;
}
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()
    }
}

Required methods

Return the byte representation of Self

Implementations on Foreign Types

Implementors