pub struct FunctionDef<T = FunctionBody> {
pub offset: i32,
pub name: Arc<CStr>,
pub source: Arc<CStr>,
pub args: ArrayVec<Type, MAX_ARGS>,
pub body: T,
}Expand description
Definition for a QuakeC function.
Fields§
§offset: i32The offset to the start of this function’s statements for QuakeC functions, the negative index of a builtin for functions provided by the host.
name: Arc<CStr>The name of this function.
source: Arc<CStr>The source file that this function is defined in.
args: ArrayVec<Type, MAX_ARGS>First N args get copied to the local stack.
body: TIf the function is defined in QuakeC, the function body.
Trait Implementations§
Source§impl<T: Clone> Clone for FunctionDef<T>
impl<T: Clone> Clone for FunctionDef<T>
Source§fn clone(&self) -> FunctionDef<T>
fn clone(&self) -> FunctionDef<T>
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<T: Debug> Debug for FunctionDef<T>
impl<T: Debug> Debug for FunctionDef<T>
Source§impl ErasedFunction for FunctionDef<QCFunctionBody>
impl ErasedFunction for FunctionDef<QCFunctionBody>
Source§fn dyn_signature(&self) -> Result<ArrayVec<Type, MAX_ARGS>>
fn dyn_signature(&self) -> Result<ArrayVec<Type, MAX_ARGS>>
Dynamic version of
Function::signature.Source§impl<T: PartialEq> PartialEq for FunctionDef<T>
impl<T: PartialEq> PartialEq for FunctionDef<T>
Source§impl QCType for FunctionDef<QCFunctionBody>
impl QCType for FunctionDef<QCFunctionBody>
impl<T: Eq> Eq for FunctionDef<T>
impl<T> StructuralPartialEq for FunctionDef<T>
Auto Trait Implementations§
impl<T> Freeze for FunctionDef<T>where
T: Freeze,
impl<T> RefUnwindSafe for FunctionDef<T>where
T: RefUnwindSafe,
impl<T> Send for FunctionDef<T>where
T: Send,
impl<T> Sync for FunctionDef<T>where
T: Sync,
impl<T> Unpin for FunctionDef<T>where
T: Unpin,
impl<T> UnsafeUnpin for FunctionDef<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for FunctionDef<T>where
T: UnwindSafe,
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,
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more