Struct hakuban::object::ObjectState
source · pub struct ObjectState<T> {
pub data: T,
pub format: DataFormat,
pub version: DataVersion,
pub synchronized: DataSynchronized,
}
Expand description
Structure holding individual data-object’s state
Fields§
§data: T
§format: DataFormat
§version: DataVersion
§synchronized: DataSynchronized
Implementations§
source§impl<T: 'static> ObjectState<T>
impl<T: 'static> ObjectState<T>
pub fn new(data: T) -> ObjectState<T>
pub fn with_data<U>(self, data: U) -> ObjectState<U>
pub fn with_version(self, version: impl Into<DataVersion>) -> ObjectState<T>
pub fn with_format(self, format: impl Into<DataFormat>) -> ObjectState<T>
pub fn with_synchronized( self, synchronized: impl Into<DataSynchronized> ) -> ObjectState<T>
Trait Implementations§
source§impl<T: Clone> Clone for ObjectState<T>
impl<T: Clone> Clone for ObjectState<T>
source§fn clone(&self) -> ObjectState<T>
fn clone(&self) -> ObjectState<T>
Returns a copy 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 JsonDeserializeState for ObjectState<Arc<Vec<u8>>>
impl JsonDeserializeState for ObjectState<Arc<Vec<u8>>>
fn json_deserialize<O: DeserializeOwned + 'static>(self) -> ObjectState<O>
fn try_json_deserialize<O: DeserializeOwned + 'static>( self ) -> Result<ObjectState<O>, JsonDeserializeError>
source§impl<T: Serialize + 'static> JsonSerializeState for ObjectState<T>
impl<T: Serialize + 'static> JsonSerializeState for ObjectState<T>
fn json_serialize(self) -> ObjectState<Arc<Vec<u8>>>
fn try_json_serialize(self) -> Result<ObjectState<Arc<Vec<u8>>>, Error>
source§impl<T: PartialEq> PartialEq<ObjectState<T>> for ObjectState<T>
impl<T: PartialEq> PartialEq<ObjectState<T>> for ObjectState<T>
source§fn eq(&self, other: &ObjectState<T>) -> bool
fn eq(&self, other: &ObjectState<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.