pub enum WireValue {
Show 13 variants
Bool(bool),
Int(i64),
Double(f64),
String(String),
Ref(Ref),
IntList(Vec<i64>),
RefList(Vec<Ref>),
Device(Device),
Layout(Layout),
ScalarType(ScalarType),
MemoryFormat(MemoryFormat),
None(()),
PyObject(PickledPyObject),
}Expand description
A value used as an input to CallFunction.
Variants§
Bool(bool)
Int(i64)
Double(f64)
String(String)
Ref(Ref)
IntList(Vec<i64>)
RefList(Vec<Ref>)
Device(Device)
Layout(Layout)
ScalarType(ScalarType)
MemoryFormat(MemoryFormat)
None(())
PyObject(PickledPyObject)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WireValue
impl<'de> Deserialize<'de> for WireValue
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 From<MemoryFormat> for WireValue
impl From<MemoryFormat> for WireValue
Source§fn from(value: MemoryFormat) -> Self
fn from(value: MemoryFormat) -> Self
Converts to this type from the input type.
Source§impl From<PickledPyObject> for WireValue
impl From<PickledPyObject> for WireValue
Source§fn from(value: PickledPyObject) -> Self
fn from(value: PickledPyObject) -> Self
Converts to this type from the input type.
Source§impl From<ScalarType> for WireValue
impl From<ScalarType> for WireValue
Source§fn from(value: ScalarType) -> Self
fn from(value: ScalarType) -> Self
Converts to this type from the input type.
Source§impl FromPyObject<'_> for WireValue
impl FromPyObject<'_> for WireValue
Source§fn extract_bound(obj: &Bound<'_, PyAny>) -> PyResult<Self>
fn extract_bound(obj: &Bound<'_, PyAny>) -> PyResult<Self>
Source§impl<'py> IntoPyObject<'py> for WireValue
impl<'py> IntoPyObject<'py> for WireValue
Source§fn into_pyobject(self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>>
fn into_pyobject(self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>>
Performs the conversion.
Source§impl Named for WireValue
impl Named for WireValue
Source§fn typename() -> &'static str
fn typename() -> &'static str
The globally unique type name for the type.
This should typically be the fully qualified Rust name of the type.
Source§fn typehash() -> u64
fn typehash() -> u64
A globally unique hash for this type.
TODO: actually enforce perfect hashing
Source§fn arm(&self) -> Option<&'static str>
fn arm(&self) -> Option<&'static str>
If the named type is an enum, this returns the name of the arm
of the value self.
Source§fn typeid() -> TypeId
fn typeid() -> TypeId
The TypeId for this type. TypeIds are unique only within a binary,
and should not be used for global identification.
Source§impl TryFrom<WireValue> for MemoryFormat
impl TryFrom<WireValue> for MemoryFormat
Source§impl TryFrom<WireValue> for PickledPyObject
impl TryFrom<WireValue> for PickledPyObject
Source§impl TryFrom<WireValue> for ScalarType
impl TryFrom<WireValue> for ScalarType
Auto Trait Implementations§
impl Freeze for WireValue
impl RefUnwindSafe for WireValue
impl Send for WireValue
impl Sync for WireValue
impl Unpin for WireValue
impl UnwindSafe for WireValue
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> Checkpointable for Twhere
T: RemoteMessage + Clone,
impl<T> Checkpointable for Twhere
T: RemoteMessage + Clone,
Source§type State = T
type State = T
The type of the state that is saved. The state can be serialized and deserialized
from persistent storage.
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