pub struct ExportRecord {
pub kind: ExportKind,
pub symbol: Symbol,
pub state: ExportState,
}Expand description
One resolved export row: its kind, symbol, and resolution state.
ExportRecord is the open metadata surface the kernel prefers over closed
enums for reporting what a library contributes (see the README “Library
system” section).
§Examples
use sim_kernel::library::{Export, ExportKind, ExportRecord, ExportState};
use sim_kernel::Symbol;
let export = Export::Value {
symbol: Symbol::new("answer"),
};
let record: ExportRecord = export.declared_record();
assert_eq!(record.kind, ExportKind::named(ExportKind::VALUE));
assert_eq!(record.symbol, Symbol::new("answer"));
assert_eq!(record.state, ExportState::Declared);Fields§
§kind: ExportKindThe export kind.
symbol: SymbolThe symbol the export is bound under.
state: ExportStateThe current resolution state of the export.
Trait Implementations§
Source§impl Clone for ExportRecord
impl Clone for ExportRecord
Source§fn clone(&self) -> ExportRecord
fn clone(&self) -> ExportRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ExportRecord
impl Debug for ExportRecord
impl Eq for ExportRecord
Source§impl PartialEq for ExportRecord
impl PartialEq for ExportRecord
Source§fn eq(&self, other: &ExportRecord) -> bool
fn eq(&self, other: &ExportRecord) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExportRecord
Auto Trait Implementations§
impl Freeze for ExportRecord
impl RefUnwindSafe for ExportRecord
impl Send for ExportRecord
impl Sync for ExportRecord
impl Unpin for ExportRecord
impl UnsafeUnpin for ExportRecord
impl UnwindSafe for ExportRecord
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