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: DataSynchronizedImplementations§
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 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 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 for ObjectState<T>
impl<T: PartialEq> PartialEq for ObjectState<T>
impl<T: Eq> Eq for ObjectState<T>
impl<T> StructuralPartialEq for ObjectState<T>
Auto Trait Implementations§
impl<T> Freeze for ObjectState<T>where
T: Freeze,
impl<T> RefUnwindSafe for ObjectState<T>where
T: RefUnwindSafe,
impl<T> Send for ObjectState<T>where
T: Send,
impl<T> Sync for ObjectState<T>where
T: Sync,
impl<T> Unpin for ObjectState<T>where
T: Unpin,
impl<T> UnwindSafe for ObjectState<T>where
T: UnwindSafe,
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<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