pub struct VersionedDB { /* private fields */ }Implementations§
Source§impl VersionedDB
impl VersionedDB
pub fn new(bytes: Vec<u8>, version: String) -> Result<VersionedDB>
pub fn deserialise(bytes: Vec<u8>) -> Result<VersionedDB>
pub fn from_bytes(bytes: Vec<u8>) -> Result<VersionedDB>
pub fn bytes(&self) -> Vec<u8> ⓘ
pub fn hash(&self) -> u32
pub fn serialise(&self) -> Result<Vec<u8>>
pub fn version(&self) -> SemVer
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for VersionedDB
impl<'__de, __Context> BorrowDecode<'__de, __Context> for VersionedDB
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl Clone for VersionedDB
impl Clone for VersionedDB
Source§fn clone(&self) -> VersionedDB
fn clone(&self) -> VersionedDB
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VersionedDB
impl Debug for VersionedDB
Source§impl<__Context> Decode<__Context> for VersionedDB
impl<__Context> Decode<__Context> for VersionedDB
Source§impl Default for VersionedDB
impl Default for VersionedDB
Source§fn default() -> VersionedDB
fn default() -> VersionedDB
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for VersionedDB
impl<'de> Deserialize<'de> for VersionedDB
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encode for VersionedDB
impl Encode for VersionedDB
Source§impl PartialEq for VersionedDB
impl PartialEq for VersionedDB
Source§impl Serialize for VersionedDB
impl Serialize for VersionedDB
impl Eq for VersionedDB
impl StructuralPartialEq for VersionedDB
Auto Trait Implementations§
impl Freeze for VersionedDB
impl RefUnwindSafe for VersionedDB
impl Send for VersionedDB
impl Sync for VersionedDB
impl Unpin for VersionedDB
impl UnwindSafe for VersionedDB
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more