pub struct LibraryImport {
pub name: String,
pub version: String,
pub required: bool,
}Expand description
A declared library import: { name: "std.events", version: "1.0" }.
Mirrors Supplement’s shape and required/optional semantics
deliberately: both are “a named, versioned external capability declared
in the document” — a supplement resolves to a compiled-in Rust extension,
a library resolves to ETDL source (built-in, optional, or user-provided).
See etdl-compiler::stdlib for resolution.
Fields§
§name: StringThe library’s dotted name, e.g. std.events. Names starting with
std. are reserved for the built-in standard library and can never
resolve to an optional or user library (see stdlib::LibraryError::Shadowing).
version: StringThe requested library version, e.g. "1.0". Compatibility is
major-version-gated, the same rule already used for doc.etdl and
for Supplement::version.
required: boolTrait Implementations§
Source§impl Clone for LibraryImport
impl Clone for LibraryImport
Source§fn clone(&self) -> LibraryImport
fn clone(&self) -> LibraryImport
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 LibraryImport
impl Debug for LibraryImport
Source§impl<'de> Deserialize<'de> for LibraryImport
impl<'de> Deserialize<'de> for LibraryImport
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LibraryImport
Source§impl PartialEq for LibraryImport
impl PartialEq for LibraryImport
Source§impl Serialize for LibraryImport
impl Serialize for LibraryImport
impl StructuralPartialEq for LibraryImport
Auto Trait Implementations§
impl Freeze for LibraryImport
impl RefUnwindSafe for LibraryImport
impl Send for LibraryImport
impl Sync for LibraryImport
impl Unpin for LibraryImport
impl UnsafeUnpin for LibraryImport
impl UnwindSafe for LibraryImport
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.