pub struct StubCustomData {
pub ts_init: UnixNanos,
pub value: i64,
}Expand description
Stub custom data type for integration tests (e.g. Redis cache).
Fields§
§ts_init: UnixNanos§value: i64Trait Implementations§
Source§impl Clone for StubCustomData
impl Clone for StubCustomData
Source§fn clone(&self) -> StubCustomData
fn clone(&self) -> StubCustomData
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 CustomDataTrait for StubCustomData
impl CustomDataTrait for StubCustomData
Source§fn clone_arc(&self) -> Arc<dyn CustomDataTrait>
fn clone_arc(&self) -> Arc<dyn CustomDataTrait>
Returns a cloned Arc of the custom data.
Source§fn eq_arc(&self, other: &dyn CustomDataTrait) -> bool
fn eq_arc(&self, other: &dyn CustomDataTrait) -> bool
Returns whether the custom data is equal to another.
Source§fn type_name_static() -> &'static str
fn type_name_static() -> &'static str
Returns the type name used in serialized form (e.g. in the
"type" field).Source§fn from_json(value: Value) -> Result<Arc<dyn CustomDataTrait>>
fn from_json(value: Value) -> Result<Arc<dyn CustomDataTrait>>
Deserializes from a JSON value into an Arc’d trait object. Read more
Source§impl Debug for StubCustomData
impl Debug for StubCustomData
Source§impl<'de> Deserialize<'de> for StubCustomData
impl<'de> Deserialize<'de> for StubCustomData
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 HasTsInit for StubCustomData
impl HasTsInit for StubCustomData
Source§impl PartialEq for StubCustomData
impl PartialEq for StubCustomData
Source§impl Serialize for StubCustomData
impl Serialize for StubCustomData
impl StructuralPartialEq for StubCustomData
Auto Trait Implementations§
impl Freeze for StubCustomData
impl RefUnwindSafe for StubCustomData
impl Send for StubCustomData
impl Sync for StubCustomData
impl Unpin for StubCustomData
impl UnsafeUnpin for StubCustomData
impl UnwindSafe for StubCustomData
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