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 minimum_version(&self) -> SupportedVersion
pub fn minimum_version(&self) -> SupportedVersion
Gets the minimum version required to call this function signature.
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,
params: &'a TypeParameters<'a>,
) -> impl Display + 'a
pub fn display<'a>( &'a self, 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