pub enum ResolvableFunction {
Cloudpickle(Cloudpickle),
FunctionPath(FunctionPath),
}
Variants§
Cloudpickle(Cloudpickle)
FunctionPath(FunctionPath)
Implementations§
Source§impl ResolvableFunction
impl ResolvableFunction
pub fn resolve<'py>(&self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>>
pub fn as_torch_op<'a>(&'a self) -> Option<(String, String)>
Sourcepub fn panic_if_requested(&self)
pub fn panic_if_requested(&self)
For testing: this is a special remote function path that induces a panic when called.
pub fn supports_pytree_args(&self) -> bool
Trait Implementations§
Source§impl Clone for ResolvableFunction
impl Clone for ResolvableFunction
Source§fn clone(&self) -> ResolvableFunction
fn clone(&self) -> ResolvableFunction
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 Debug for ResolvableFunction
impl Debug for ResolvableFunction
Source§impl<'de> Deserialize<'de> for ResolvableFunction
impl<'de> Deserialize<'de> for ResolvableFunction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ResolvableFunction
impl Display for ResolvableFunction
Source§impl From<Cloudpickle> for ResolvableFunction
impl From<Cloudpickle> for ResolvableFunction
Source§fn from(value: Cloudpickle) -> Self
fn from(value: Cloudpickle) -> Self
Converts to this type from the input type.
Source§impl From<FunctionPath> for ResolvableFunction
impl From<FunctionPath> for ResolvableFunction
Source§fn from(value: FunctionPath) -> Self
fn from(value: FunctionPath) -> Self
Converts to this type from the input type.
Source§impl<'py> FromPyObject<'py> for ResolvableFunction
impl<'py> FromPyObject<'py> for ResolvableFunction
Source§fn extract_bound(obj: &Bound<'py, PyAny>) -> PyResult<Self>
fn extract_bound(obj: &Bound<'py, PyAny>) -> PyResult<Self>
Source§impl<'py> IntoPyObject<'py> for ResolvableFunction
impl<'py> IntoPyObject<'py> for ResolvableFunction
Source§type Output = Bound<'py, <ResolvableFunction as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <ResolvableFunction as IntoPyObject<'py>>::Target>
The smart pointer type to use. Read more
Source§fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
fn into_pyobject(self, py: Python<'py>) -> Result<Self::Output, Self::Error>
Performs the conversion.
Source§impl PartialEq for ResolvableFunction
impl PartialEq for ResolvableFunction
Source§impl Serialize for ResolvableFunction
impl Serialize for ResolvableFunction
Source§impl TryFrom<ResolvableFunction> for Cloudpickle
impl TryFrom<ResolvableFunction> for Cloudpickle
Source§type Error = TryIntoError<ResolvableFunction>
type Error = TryIntoError<ResolvableFunction>
The type returned in the event of a conversion error.
Source§impl TryFrom<ResolvableFunction> for FunctionPath
impl TryFrom<ResolvableFunction> for FunctionPath
Source§type Error = TryIntoError<ResolvableFunction>
type Error = TryIntoError<ResolvableFunction>
The type returned in the event of a conversion error.
impl StructuralPartialEq for ResolvableFunction
Auto Trait Implementations§
impl Freeze for ResolvableFunction
impl RefUnwindSafe for ResolvableFunction
impl Send for ResolvableFunction
impl Sync for ResolvableFunction
impl Unpin for ResolvableFunction
impl UnwindSafe for ResolvableFunction
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,
§impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
§fn from_py_object_bound(ob: Borrowed<'_, 'py, PyAny>) -> Result<T, PyErr>
fn from_py_object_bound(ob: Borrowed<'_, 'py, PyAny>) -> Result<T, PyErr>
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
Converts
self
into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
Converts
self
into an owned Python object, dropping type information and unbinding it
from the 'py
lifetime.§fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
Converts
self
into a Python object. Read more