Struct wdl_analysis::FunctionSignature
source · pub struct FunctionSignature { /* private fields */ }Expand description
Represents a WDL function signature.
Implementations§
source§impl FunctionSignature
impl FunctionSignature
sourcepub fn builder() -> FunctionSignatureBuilder
pub fn builder() -> FunctionSignatureBuilder
Builds a function signature builder.
sourcepub fn type_parameters(&self) -> &[TypeParameter]
pub fn type_parameters(&self) -> &[TypeParameter]
Gets the function’s type parameters.
sourcepub fn parameters(&self) -> &[FunctionalType]
pub fn parameters(&self) -> &[FunctionalType]
Gets the types of the function’s parameters.
sourcepub fn required(&self) -> usize
pub fn required(&self) -> usize
Gets the minimum number of required parameters.
For a function without optional parameters, this will be the same as the number of parameters for the function.
sourcepub fn ret(&self) -> &FunctionalType
pub fn ret(&self) -> &FunctionalType
Gets the function’s return type.
sourcepub fn is_generic(&self) -> bool
pub fn is_generic(&self) -> bool
Determines if the function signature is generic.
sourcepub fn generic_parameter_count(&self) -> usize
pub fn generic_parameter_count(&self) -> usize
Gets the count of generic parameters for the function.
sourcepub fn display<'a>(
&'a self,
types: &'a Types,
params: &'a TypeParameters<'a>,
) -> impl Display + 'a
pub fn display<'a>( &'a self, types: &'a Types, params: &'a TypeParameters<'a>, ) -> impl Display + 'a
Returns an object that implements Display for formatting the signature
with the given function name.
Trait Implementations§
source§impl Debug for FunctionSignature
impl Debug for FunctionSignature
Auto Trait Implementations§
impl Freeze for FunctionSignature
impl !RefUnwindSafe for FunctionSignature
impl Send for FunctionSignature
impl Sync for FunctionSignature
impl Unpin for FunctionSignature
impl !UnwindSafe for FunctionSignature
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> 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