[−][src]Enum faerie::Decl
The kind of declaration this is
Variants
Import(ImportKind)
Declaration of an import
Defined(DefinedDecl)
Declaration of an item to be defined in this artifact
Methods
impl Decl
[src]
pub fn function_import() -> FunctionImportDecl
[src]
An import of a function/routine defined in a shared library
pub fn data_import() -> DataImportDecl
[src]
A GOT-based import of data defined in a shared library
pub fn function() -> FunctionDecl
[src]
A function defined in this artifact
pub fn data() -> DataDecl
[src]
A data object defined in this artifact
pub fn cstring() -> DataDecl
[src]
A null-terminated string object defined in this artifact
pub fn section(kind: SectionKind) -> SectionDecl
[src]
A section defined in this artifact
pub fn absorb(&mut self, other: Self) -> Result<(), ArtifactError>
[src]
If it is compatible, absorb the new declaration (other
) into the old (self
); otherwise returns an error.
The rule here is "C-ish", but essentially:
- Duplicate declarations are no-ops / ignored.
- If the previous declaration was an FunctionImport or DataImport, then if the subsequent declaration is a corresponding matching Function or Data declaration, it is said to be "upgraded", and forever after is considered a declaration in need of a definition.
- If the previous declaration was a
Function
orData
declaration, then a subsequent correspondingFunctionImport
orDataImport
is a no-op. - Anything else is a IncompatibleDeclaration error!
pub fn is_import(&self) -> bool
[src]
Is this an import (function or data) from a shared library?
pub fn is_section(&self) -> bool
[src]
Is this a section?
Trait Implementations
impl Clone for Decl
[src]
fn clone(&self) -> Decl
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Ord for Decl
[src]
fn cmp(&self, other: &Decl) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl PartialOrd<Decl> for Decl
[src]
fn partial_cmp(&self, other: &Decl) -> Option<Ordering>
[src]
fn lt(&self, other: &Decl) -> bool
[src]
fn le(&self, other: &Decl) -> bool
[src]
fn gt(&self, other: &Decl) -> bool
[src]
fn ge(&self, other: &Decl) -> bool
[src]
impl Into<Decl> for FunctionImportDecl
[src]
impl Into<Decl> for DataImportDecl
[src]
impl Into<Decl> for FunctionDecl
[src]
impl Into<Decl> for DataDecl
[src]
impl Into<Decl> for SectionDecl
[src]
impl Copy for Decl
[src]
impl Eq for Decl
[src]
impl PartialEq<Decl> for Decl
[src]
impl Debug for Decl
[src]
Auto Trait Implementations
impl Send for Decl
impl Unpin for Decl
impl Sync for Decl
impl UnwindSafe for Decl
impl RefUnwindSafe for Decl
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,