pub struct FormatStamp {
pub version: u64,
pub contract: u64,
}Expand description
A token file’s format stamp: the format and contract versions it was written for.
Fields§
§version: u64The format’s version (FORMAT_VERSION).
contract: u64The contract’s version (CONTRACT_VERSION).
Implementations§
Source§impl FormatStamp
impl FormatStamp
Sourcepub const CURRENT: FormatStamp
pub const CURRENT: FormatStamp
What this egui-pop writes, and what a file without a stamp is read as.
Sourcepub fn to_json(self) -> Json
pub fn to_json(self) -> Json
The stamp as written under FORMAT_EXTENSION.
Sourcepub fn read(file: &TokenFile) -> (FormatStamp, Vec<Warning>)
pub fn read(file: &TokenFile) -> (FormatStamp, Vec<Warning>)
The stamp a file carries, FormatStamp::CURRENT when it has
none, and what is wrong with it: a part that cannot be read
counts as current, and a version newer than this egui-pop’s is
read best-effort; each says so in a warning.
Trait Implementations§
Source§impl Clone for FormatStamp
impl Clone for FormatStamp
Source§fn clone(&self) -> FormatStamp
fn clone(&self) -> FormatStamp
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 Debug for FormatStamp
impl Debug for FormatStamp
Source§impl PartialEq for FormatStamp
impl PartialEq for FormatStamp
impl Copy for FormatStamp
impl Eq for FormatStamp
impl StructuralPartialEq for FormatStamp
Auto Trait Implementations§
impl Freeze for FormatStamp
impl RefUnwindSafe for FormatStamp
impl Send for FormatStamp
impl Sync for FormatStamp
impl Unpin for FormatStamp
impl UnsafeUnpin for FormatStamp
impl UnwindSafe for FormatStamp
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.