pub struct FunctionOverload<F, A, R, C>(/* private fields */);
Expand description
An overload of a function in GeoScript
.
Trait Implementations§
Source§impl<R, F> Overload for FunctionOverload<F, (), R, &CompileContext>
impl<R, F> Overload for FunctionOverload<F, (), R, &CompileContext>
Source§fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
Get the return type for the given parameters. Returns
None
if the overload
cannot be called with these parameters.Source§fn unroll(
&self,
params: Vec<AnyExpr>,
context: &mut CompileContext,
props: Properties,
) -> AnyExpr
fn unroll( &self, params: Vec<AnyExpr>, context: &mut CompileContext, props: Properties, ) -> AnyExpr
Unroll the function for the given params. The resulting expression
matches the type returned by
get_returned_type
.Source§impl<R, F> Overload for FunctionOverload<F, (), R, &mut CompileContext>
impl<R, F> Overload for FunctionOverload<F, (), R, &mut CompileContext>
Source§fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
Get the return type for the given parameters. Returns
None
if the overload
cannot be called with these parameters.Source§fn unroll(
&self,
params: Vec<AnyExpr>,
context: &mut CompileContext,
props: Properties,
) -> AnyExpr
fn unroll( &self, params: Vec<AnyExpr>, context: &mut CompileContext, props: Properties, ) -> AnyExpr
Unroll the function for the given params. The resulting expression
matches the type returned by
get_returned_type
.Source§impl<T0, R, F> Overload for FunctionOverload<F, (T0,), R, &CompileContext>where
T0: GeoType + 'static,
R: GeoType + Into<AnyExpr> + 'static,
F: Fn(T0, &CompileContext, Properties) -> R,
impl<T0, R, F> Overload for FunctionOverload<F, (T0,), R, &CompileContext>where
T0: GeoType + 'static,
R: GeoType + Into<AnyExpr> + 'static,
F: Fn(T0, &CompileContext, Properties) -> R,
Source§fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
Get the return type for the given parameters. Returns
None
if the overload
cannot be called with these parameters.Source§fn unroll(
&self,
params: Vec<AnyExpr>,
context: &mut CompileContext,
props: Properties,
) -> AnyExpr
fn unroll( &self, params: Vec<AnyExpr>, context: &mut CompileContext, props: Properties, ) -> AnyExpr
Unroll the function for the given params. The resulting expression
matches the type returned by
get_returned_type
.Source§impl<T0, R, F> Overload for FunctionOverload<F, (T0,), R, &mut CompileContext>where
T0: GeoType + 'static,
R: GeoType + Into<AnyExpr> + 'static,
F: Fn(T0, &mut CompileContext, Properties) -> R,
impl<T0, R, F> Overload for FunctionOverload<F, (T0,), R, &mut CompileContext>where
T0: GeoType + 'static,
R: GeoType + Into<AnyExpr> + 'static,
F: Fn(T0, &mut CompileContext, Properties) -> R,
Source§fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
Get the return type for the given parameters. Returns
None
if the overload
cannot be called with these parameters.Source§fn unroll(
&self,
params: Vec<AnyExpr>,
context: &mut CompileContext,
props: Properties,
) -> AnyExpr
fn unroll( &self, params: Vec<AnyExpr>, context: &mut CompileContext, props: Properties, ) -> AnyExpr
Unroll the function for the given params. The resulting expression
matches the type returned by
get_returned_type
.Source§impl<T0, T1, R, F> Overload for FunctionOverload<F, (T0, T1), R, &CompileContext>where
T0: GeoType + 'static,
T1: GeoType + 'static,
R: GeoType + Into<AnyExpr> + 'static,
F: Fn(T0, T1, &CompileContext, Properties) -> R,
impl<T0, T1, R, F> Overload for FunctionOverload<F, (T0, T1), R, &CompileContext>where
T0: GeoType + 'static,
T1: GeoType + 'static,
R: GeoType + Into<AnyExpr> + 'static,
F: Fn(T0, T1, &CompileContext, Properties) -> R,
Source§fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
Get the return type for the given parameters. Returns
None
if the overload
cannot be called with these parameters.Source§fn unroll(
&self,
params: Vec<AnyExpr>,
context: &mut CompileContext,
props: Properties,
) -> AnyExpr
fn unroll( &self, params: Vec<AnyExpr>, context: &mut CompileContext, props: Properties, ) -> AnyExpr
Unroll the function for the given params. The resulting expression
matches the type returned by
get_returned_type
.Source§impl<T0, T1, R, F> Overload for FunctionOverload<F, (T0, T1), R, &mut CompileContext>where
T0: GeoType + 'static,
T1: GeoType + 'static,
R: GeoType + Into<AnyExpr> + 'static,
F: Fn(T0, T1, &mut CompileContext, Properties) -> R,
impl<T0, T1, R, F> Overload for FunctionOverload<F, (T0, T1), R, &mut CompileContext>where
T0: GeoType + 'static,
T1: GeoType + 'static,
R: GeoType + Into<AnyExpr> + 'static,
F: Fn(T0, T1, &mut CompileContext, Properties) -> R,
Source§fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
Get the return type for the given parameters. Returns
None
if the overload
cannot be called with these parameters.Source§fn unroll(
&self,
params: Vec<AnyExpr>,
context: &mut CompileContext,
props: Properties,
) -> AnyExpr
fn unroll( &self, params: Vec<AnyExpr>, context: &mut CompileContext, props: Properties, ) -> AnyExpr
Unroll the function for the given params. The resulting expression
matches the type returned by
get_returned_type
.Source§impl<T0, T1, T2, R, F> Overload for FunctionOverload<F, (T0, T1, T2), R, &CompileContext>where
T0: GeoType + 'static,
T1: GeoType + 'static,
T2: GeoType + 'static,
R: GeoType + Into<AnyExpr> + 'static,
F: Fn(T0, T1, T2, &CompileContext, Properties) -> R,
impl<T0, T1, T2, R, F> Overload for FunctionOverload<F, (T0, T1, T2), R, &CompileContext>where
T0: GeoType + 'static,
T1: GeoType + 'static,
T2: GeoType + 'static,
R: GeoType + Into<AnyExpr> + 'static,
F: Fn(T0, T1, T2, &CompileContext, Properties) -> R,
Source§fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
Get the return type for the given parameters. Returns
None
if the overload
cannot be called with these parameters.Source§fn unroll(
&self,
params: Vec<AnyExpr>,
context: &mut CompileContext,
props: Properties,
) -> AnyExpr
fn unroll( &self, params: Vec<AnyExpr>, context: &mut CompileContext, props: Properties, ) -> AnyExpr
Unroll the function for the given params. The resulting expression
matches the type returned by
get_returned_type
.Source§impl<T0, T1, T2, R, F> Overload for FunctionOverload<F, (T0, T1, T2), R, &mut CompileContext>where
T0: GeoType + 'static,
T1: GeoType + 'static,
T2: GeoType + 'static,
R: GeoType + Into<AnyExpr> + 'static,
F: Fn(T0, T1, T2, &mut CompileContext, Properties) -> R,
impl<T0, T1, T2, R, F> Overload for FunctionOverload<F, (T0, T1, T2), R, &mut CompileContext>where
T0: GeoType + 'static,
T1: GeoType + 'static,
T2: GeoType + 'static,
R: GeoType + Into<AnyExpr> + 'static,
F: Fn(T0, T1, T2, &mut CompileContext, Properties) -> R,
Source§fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
Get the return type for the given parameters. Returns
None
if the overload
cannot be called with these parameters.Source§fn unroll(
&self,
params: Vec<AnyExpr>,
context: &mut CompileContext,
props: Properties,
) -> AnyExpr
fn unroll( &self, params: Vec<AnyExpr>, context: &mut CompileContext, props: Properties, ) -> AnyExpr
Unroll the function for the given params. The resulting expression
matches the type returned by
get_returned_type
.Source§impl<T0, T1, T2, T3, R, F> Overload for FunctionOverload<F, (T0, T1, T2, T3), R, &CompileContext>where
T0: GeoType + 'static,
T1: GeoType + 'static,
T2: GeoType + 'static,
T3: GeoType + 'static,
R: GeoType + Into<AnyExpr> + 'static,
F: Fn(T0, T1, T2, T3, &CompileContext, Properties) -> R,
impl<T0, T1, T2, T3, R, F> Overload for FunctionOverload<F, (T0, T1, T2, T3), R, &CompileContext>where
T0: GeoType + 'static,
T1: GeoType + 'static,
T2: GeoType + 'static,
T3: GeoType + 'static,
R: GeoType + Into<AnyExpr> + 'static,
F: Fn(T0, T1, T2, T3, &CompileContext, Properties) -> R,
Source§fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
Get the return type for the given parameters. Returns
None
if the overload
cannot be called with these parameters.Source§fn unroll(
&self,
params: Vec<AnyExpr>,
context: &mut CompileContext,
props: Properties,
) -> AnyExpr
fn unroll( &self, params: Vec<AnyExpr>, context: &mut CompileContext, props: Properties, ) -> AnyExpr
Unroll the function for the given params. The resulting expression
matches the type returned by
get_returned_type
.Source§impl<T0, T1, T2, T3, R, F> Overload for FunctionOverload<F, (T0, T1, T2, T3), R, &mut CompileContext>where
T0: GeoType + 'static,
T1: GeoType + 'static,
T2: GeoType + 'static,
T3: GeoType + 'static,
R: GeoType + Into<AnyExpr> + 'static,
F: Fn(T0, T1, T2, T3, &mut CompileContext, Properties) -> R,
impl<T0, T1, T2, T3, R, F> Overload for FunctionOverload<F, (T0, T1, T2, T3), R, &mut CompileContext>where
T0: GeoType + 'static,
T1: GeoType + 'static,
T2: GeoType + 'static,
T3: GeoType + 'static,
R: GeoType + Into<AnyExpr> + 'static,
F: Fn(T0, T1, T2, T3, &mut CompileContext, Properties) -> R,
Source§fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
fn get_returned_type(&self, params: &[AnyExpr]) -> Option<Type>
Get the return type for the given parameters. Returns
None
if the overload
cannot be called with these parameters.Source§fn unroll(
&self,
params: Vec<AnyExpr>,
context: &mut CompileContext,
props: Properties,
) -> AnyExpr
fn unroll( &self, params: Vec<AnyExpr>, context: &mut CompileContext, props: Properties, ) -> AnyExpr
Unroll the function for the given params. The resulting expression
matches the type returned by
get_returned_type
.Auto Trait Implementations§
impl<F, A, R, C> Freeze for FunctionOverload<F, A, R, C>where
F: Freeze,
impl<F, A, R, C> RefUnwindSafe for FunctionOverload<F, A, R, C>
impl<F, A, R, C> Send for FunctionOverload<F, A, R, C>
impl<F, A, R, C> Sync for FunctionOverload<F, A, R, C>
impl<F, A, R, C> Unpin for FunctionOverload<F, A, R, C>
impl<F, A, R, C> UnwindSafe for FunctionOverload<F, A, R, C>
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> Convert for T
impl<T> Convert for T
Source§fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
Convert
self
into a specific type. Read moreSource§fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
Check if
self
can be converted into a specific type. Read moreSource§impl<T> IntoOverload<T> for Twhere
T: Overload + 'static,
impl<T> IntoOverload<T> for Twhere
T: Overload + 'static,
Source§fn into_overload(self) -> <T as IntoOverload<T>>::Target
fn into_overload(self) -> <T as IntoOverload<T>>::Target
Turn this into a function overload.