pub struct RirExternFn {
pub library: Spur,
pub name: Spur,
pub directives_start: u32,
pub directives_len: u32,
pub params_start: u32,
pub params_len: u32,
pub return_type: Spur,
pub span: Span,
pub block_span: Span,
pub link_mode: RirLinkMode,
}Expand description
ADR-0085: a body-less extern fn declared inside a link_extern("…") { … }
block.
These are tracked as a side-set on the Rir rather than as
FnDecl instructions because their lowering pipeline diverges from
regular fns: no body to translate, no Gruel mangling, library name
to thread through to the linker.
Fields§
§library: SpurLibrary name (interned, as written in the link_extern("…") head).
name: SpurFunction name (as it appears in Gruel source).
directives_start: u32Index into the extra array where this fn’s directives start.
directives_len: u32Number of directives.
params_start: u32Index into the extra array where this fn’s params start.
params_len: u32Number of parameters.
return_type: SpurReturn type as a Spur (defaults to () when omitted in source).
span: SpanSpan of the fn declaration.
block_span: SpanSpan of the enclosing link_extern(...) block.
link_mode: RirLinkModeADR-0086: dynamic (link_extern) vs static (static_link_extern).
Trait Implementations§
Source§impl Clone for RirExternFn
impl Clone for RirExternFn
Source§fn clone(&self) -> RirExternFn
fn clone(&self) -> RirExternFn
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RirExternFn
impl Debug for RirExternFn
Source§impl<'de> Deserialize<'de> for RirExternFn
impl<'de> Deserialize<'de> for RirExternFn
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>,
Auto Trait Implementations§
impl Freeze for RirExternFn
impl RefUnwindSafe for RirExternFn
impl Send for RirExternFn
impl Sync for RirExternFn
impl Unpin for RirExternFn
impl UnsafeUnpin for RirExternFn
impl UnwindSafe for RirExternFn
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
MaybeRef].