pub struct AppMsg<T> where
T: StrictEncode + StrictDecode, {
pub app: StormApp,
pub data: T,
}
Fields
app: StormApp
data: T
Trait Implementations
sourceimpl<T: Clone> Clone for AppMsg<T> where
T: StrictEncode + StrictDecode,
impl<T: Clone> Clone for AppMsg<T> where
T: StrictEncode + StrictDecode,
sourceimpl<T: Debug> Debug for AppMsg<T> where
T: StrictEncode + StrictDecode,
impl<T: Debug> Debug for AppMsg<T> where
T: StrictEncode + StrictDecode,
sourceimpl<T> Display for AppMsg<T> where
T: Display + StrictEncode + StrictDecode,
impl<T> Display for AppMsg<T> where
T: Display + StrictEncode + StrictDecode,
sourceimpl<T: Hash> Hash for AppMsg<T> where
T: StrictEncode + StrictDecode,
impl<T: Hash> Hash for AppMsg<T> where
T: StrictEncode + StrictDecode,
sourceimpl<T: Ord> Ord for AppMsg<T> where
T: StrictEncode + StrictDecode,
impl<T: Ord> Ord for AppMsg<T> where
T: StrictEncode + StrictDecode,
sourceimpl<T: PartialEq> PartialEq<AppMsg<T>> for AppMsg<T> where
T: StrictEncode + StrictDecode,
impl<T: PartialEq> PartialEq<AppMsg<T>> for AppMsg<T> where
T: StrictEncode + StrictDecode,
sourceimpl<T: PartialOrd> PartialOrd<AppMsg<T>> for AppMsg<T> where
T: StrictEncode + StrictDecode,
impl<T: PartialOrd> PartialOrd<AppMsg<T>> for AppMsg<T> where
T: StrictEncode + StrictDecode,
sourcefn partial_cmp(&self, other: &AppMsg<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &AppMsg<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<T> StormMesg for AppMsg<T> where
T: StrictEncode + StrictDecode,
impl<T> StormMesg for AppMsg<T> where
T: StrictEncode + StrictDecode,
sourceimpl<T> StrictDecode for AppMsg<T> where
T: StrictEncode + StrictDecode,
impl<T> StrictDecode for AppMsg<T> where
T: StrictEncode + StrictDecode,
sourcefn strict_decode<D: Read>(d: D) -> Result<Self, Error>
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
Decode with the given std::io::Read
instance; must either
construct an instance or return implementation-specific error type. Read more
sourcefn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
Tries to deserialize byte array into the current type using
StrictDecode::strict_decode
. If there are some data remains in the
buffer once deserialization is completed, fails with
Error::DataNotEntirelyConsumed
. Use io::Cursor
over the buffer and
StrictDecode::strict_decode
to avoid such failures. Read more
sourcefn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
Reads data from file at path
and reconstructs object from it. Fails
with Error::DataNotEntirelyConsumed
if file contains remaining
data after the object reconstruction. Read more
sourceimpl<T> StrictEncode for AppMsg<T> where
T: StrictEncode + StrictDecode,
impl<T> StrictEncode for AppMsg<T> where
T: StrictEncode + StrictDecode,
sourcefn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
Encode with the given std::io::Write
instance; must return result
with either amount of bytes encoded – or implementation-specific
error type. Read more
sourcefn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
fn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
Serializes data as a byte array using StrictEncode::strict_encode
function Read more
impl<T: Copy> Copy for AppMsg<T> where
T: StrictEncode + StrictDecode,
impl<T: Eq> Eq for AppMsg<T> where
T: StrictEncode + StrictDecode,
impl<T> StructuralEq for AppMsg<T> where
T: StrictEncode + StrictDecode,
impl<T> StructuralPartialEq for AppMsg<T> where
T: StrictEncode + StrictDecode,
Auto Trait Implementations
impl<T> RefUnwindSafe for AppMsg<T> where
T: RefUnwindSafe,
impl<T> Send for AppMsg<T> where
T: Send,
impl<T> Sync for AppMsg<T> where
T: Sync,
impl<T> Unpin for AppMsg<T> where
T: Unpin,
impl<T> UnwindSafe for AppMsg<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more