#[repr(C)]pub struct VersionInfo { /* private fields */ }
Expand description
VersionInfo is information about a Lucet module to allow the Lucet runtime to determine if or
how the module can be loaded, if so requested. The information here describes implementation
details in runtime support for lucetc
-produced modules, and nothing higher level.
Implementations§
Source§impl VersionInfo
impl VersionInfo
pub fn new( major: u16, minor: u16, patch: u16, version_hash: [u8; 8], ) -> VersionInfo
Sourcepub fn compatible_with(&self, other: &VersionInfo) -> bool
pub fn compatible_with(&self, other: &VersionInfo) -> bool
A more permissive version check than for version equality. This check will allow an other
version that is more specific than self
, but matches for data that is available.
pub fn write_to<W: WriteBytesExt>(&self, w: &mut W) -> Result<()>
pub fn read_from<R: ReadBytesExt>(r: &mut R) -> Result<Self>
pub fn valid(&self) -> bool
pub fn current(current_hash: &'static [u8]) -> Self
Trait Implementations§
Source§impl Clone for VersionInfo
impl Clone for VersionInfo
Source§fn clone(&self) -> VersionInfo
fn clone(&self) -> VersionInfo
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 VersionInfo
impl Debug for VersionInfo
Source§impl Display for VersionInfo
impl Display for VersionInfo
Source§impl PartialEq for VersionInfo
impl PartialEq for VersionInfo
impl Eq for VersionInfo
impl StructuralPartialEq for VersionInfo
Auto Trait Implementations§
impl Freeze for VersionInfo
impl RefUnwindSafe for VersionInfo
impl Send for VersionInfo
impl Sync for VersionInfo
impl Unpin for VersionInfo
impl UnwindSafe for VersionInfo
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