Skip to main content

Versioned

Trait Versioned 

Source
pub trait Versioned {
    // Required method
    fn version(&self) -> u64;

    // Provided method
    fn is_greater_than_or_equal(&self, version: u64) -> bool { ... }
}
Expand description

Trait indicating that the item is versioned.

Required Methods§

Source

fn version(&self) -> u64

Retrieve the version for this item instance.

Provided Methods§

Source

fn is_greater_than_or_equal(&self, version: u64) -> bool

Determine if this item’s version is greater than or equal to the provided version parameter.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§