pub struct MonomorphicFunction { /* private fields */ }
Expand description
Represents a monomorphic function.
In this context, a monomorphic function has only a single type (i.e. signature).
Implementations§
Source§impl MonomorphicFunction
impl MonomorphicFunction
Sourcepub fn new(signature: FunctionSignature) -> Self
pub fn new(signature: FunctionSignature) -> Self
Constructs a new monomorphic function.
Sourcepub fn minimum_version(&self) -> SupportedVersion
pub fn minimum_version(&self) -> SupportedVersion
Gets the minimum WDL version required to call this function.
Sourcepub fn param_min_max(&self, version: SupportedVersion) -> Option<(usize, usize)>
pub fn param_min_max(&self, version: SupportedVersion) -> Option<(usize, usize)>
Gets the minimum and maximum number of parameters the function has for the given WDL version.
Returns None
if the function is not supported for the given version.
Sourcepub fn signature(&self) -> &FunctionSignature
pub fn signature(&self) -> &FunctionSignature
Gets the signature of the function.
Sourcepub fn bind<'a>(
&'a self,
version: SupportedVersion,
arguments: &[Type],
) -> Result<Binding<'a>, FunctionBindError>
pub fn bind<'a>( &'a self, version: SupportedVersion, arguments: &[Type], ) -> Result<Binding<'a>, FunctionBindError>
Binds the function to the given arguments.
Trait Implementations§
Source§impl Debug for MonomorphicFunction
impl Debug for MonomorphicFunction
Source§impl From<MonomorphicFunction> for Function
impl From<MonomorphicFunction> for Function
Source§fn from(value: MonomorphicFunction) -> Self
fn from(value: MonomorphicFunction) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MonomorphicFunction
impl !RefUnwindSafe for MonomorphicFunction
impl Send for MonomorphicFunction
impl Sync for MonomorphicFunction
impl Unpin for MonomorphicFunction
impl !UnwindSafe for MonomorphicFunction
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