Struct savefile::Canary1 [−][src]
pub struct Canary1 {}
Expand description
Useful zero-sized marker. It serializes to a magic value, and verifies this value on deserialization. Does not consume memory data structure. Useful to troubleshoot broken Serialize/Deserialize implementations.
Implementations
Trait Implementations
Deserialize and return an instance of Self from the given deserializer.
Returns the value of the object, excluding children, as a string. Exactly what the value returned here is depends on the type. For some types, like a plain array, there isn’t much of a value, the entire information of object resides in the children. For other cases, like a department in an organisation, it might make sense to have the value be the name, and have all the other properties as children. Read more
Returns an the name and &dyn Introspect for the child with the given index, or if no child with that index exists, None. All the children should be indexed consecutively starting at 0 with no gaps, all though there isn’t really anything stopping the user of the trait to have any arbitrary index strategy, consecutive numbering 0, 1, 2, … etc is strongly encouraged. Read more
Returns the total number of children. The default implementation calculates this by simply calling introspect_child with higher and higher indexes until it returns None. It gives up if the count reaches 10000. If your type can be bigger and you want to be able to introspect it, override this method. Read more
Serialize self into the given serializer.
Auto Trait Implementations
impl RefUnwindSafe for Canary1
impl UnwindSafe for Canary1
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V