Enum rune::runtime::Value

source ·
pub enum Value {
Show 34 variants Bool(bool), Byte(u8), Char(char), Integer(i64), Float(f64), Type(Type), Ordering(Ordering), String(Shared<String>), Bytes(Shared<Bytes>), Vec(Shared<Vec>), EmptyTuple, Tuple(Shared<OwnedTuple>), Object(Shared<Object>), RangeFrom(Shared<RangeFrom>), RangeFull(Shared<RangeFull>), RangeInclusive(Shared<RangeInclusive>), RangeToInclusive(Shared<RangeToInclusive>), RangeTo(Shared<RangeTo>), Range(Shared<Range>), ControlFlow(Shared<ControlFlow>), Future(Shared<Future>), Stream(Shared<Stream<Vm>>), Generator(Shared<Generator<Vm>>), GeneratorState(Shared<GeneratorState>), Option(Shared<Option<Value>>), Result(Shared<Result<Value, Value>>), EmptyStruct(Shared<EmptyStruct>), TupleStruct(Shared<TupleStruct>), Struct(Shared<Struct>), Variant(Shared<Variant>), Function(Shared<Function>), Format(Shared<Format>), Iterator(Shared<Iterator>), Any(Shared<AnyObj>),
}
Expand description

An entry on the stack.

Variants§

§

Bool(bool)

A boolean.

§

Byte(u8)

A single byte.

§

Char(char)

A character.

§

Integer(i64)

A number.

§

Float(f64)

A float.

§

Type(Type)

A type hash. Describes a type in the virtual machine.

§

Ordering(Ordering)

Ordering.

§

String(Shared<String>)

A UTF-8 string.

§

Bytes(Shared<Bytes>)

A byte string.

§

Vec(Shared<Vec>)

A vector containing any values.

§

EmptyTuple

The unit value.

§

Tuple(Shared<OwnedTuple>)

A tuple.

§

Object(Shared<Object>)

An object.

§

RangeFrom(Shared<RangeFrom>)

A range start..

§

RangeFull(Shared<RangeFull>)

A full range ..

§

RangeInclusive(Shared<RangeInclusive>)

A full range start..=end

§

RangeToInclusive(Shared<RangeToInclusive>)

A full range ..=end

§

RangeTo(Shared<RangeTo>)

A full range ..end

§

Range(Shared<Range>)

A range start..end.

§

ControlFlow(Shared<ControlFlow>)

A control flow indicator.

§

Future(Shared<Future>)

A stored future.

§

Stream(Shared<Stream<Vm>>)

A Stream.

§

Generator(Shared<Generator<Vm>>)

A stored generator.

§

GeneratorState(Shared<GeneratorState>)

Generator state.

§

Option(Shared<Option<Value>>)

An empty value indicating nothing.

§

Result(Shared<Result<Value, Value>>)

A stored result in a slot.

§

EmptyStruct(Shared<EmptyStruct>)

An struct with a well-defined type.

§

TupleStruct(Shared<TupleStruct>)

A tuple with a well-defined type.

§

Struct(Shared<Struct>)

An struct with a well-defined type.

§

Variant(Shared<Variant>)

The variant of an enum.

§

Function(Shared<Function>)

A stored function pointer.

§

Format(Shared<Format>)

A value being formatted.

§

Iterator(Shared<Iterator>)

An iterator.

§

Any(Shared<AnyObj>)

An opaque value that can be downcasted.

Implementations§

source§

impl Value

source

pub fn string_display(&self, f: &mut Formatter) -> VmResult<()>

Format the value using the Protocol::STRING_DISPLAY protocol.

Requires a work buffer buf which will be used in case the value provided requires out-of-line formatting. This must be cleared between calls and can be re-used.

You must use Vm::with to specify which virtual machine this function is called inside.

§Panics

This function will panic if called outside of a virtual machine.

source

pub fn string_debug(&self, f: &mut Formatter) -> VmResult<()>

Debug format the value using the STRING_DEBUG protocol.

You must use Vm::with to specify which virtual machine this function is called inside.

§Panics

This function will panic if called outside of a virtual machine.

source

pub fn into_iter(self) -> VmResult<Iterator>

Convert value into an iterator using the Protocol::INTO_ITER protocol.

You must use Vm::with to specify which virtual machine this function is called inside.

§Errors

This function will error if called outside of a virtual machine context.

source

pub fn into_future(self) -> VmResult<Shared<Future>>

Coerce into a future, or convert into a future using the Protocol::INTO_FUTURE protocol.

You must use Vm::with to specify which virtual machine this function is called inside.

§Errors

This function errors in case the provided type cannot be converted into a future without the use of a Vm and one is not provided through the environment.

source

pub fn into_type_name(self) -> VmResult<String>

Retrieves a human readable type name for the current value.

You must use Vm::with to specify which virtual machine this function is called inside.

§Errors

This function errors in case the provided type cannot be converted into a name without the use of a Vm and one is not provided through the environment.

source

pub fn vec(vec: Vec<Value>) -> VmResult<Self>

Construct a vector.

source

pub fn tuple(vec: Vec<Value>) -> VmResult<Self>

Construct a tuple.

source

pub fn empty_struct(rtti: Arc<Rtti>) -> VmResult<Self>

Construct an empty.

source

pub fn tuple_struct(rtti: Arc<Rtti>, vec: Vec<Value>) -> VmResult<Self>

Construct a typed tuple.

source

pub fn unit_variant(rtti: Arc<VariantRtti>) -> VmResult<Self>

Construct an empty variant.

source

pub fn tuple_variant(rtti: Arc<VariantRtti>, vec: Vec<Value>) -> VmResult<Self>

Construct a tuple variant.

source

pub fn take(self) -> VmResult<Self>

Take the interior value.

source

pub fn into_unit(self) -> VmResult<()>

Try to coerce value into a unit.

source

pub fn as_bool(&self) -> VmResult<bool>

Try to coerce value into a boolean.

source

pub fn into_bool(self) -> VmResult<bool>

Try to coerce value into a boolean.

source

pub fn as_byte(&self) -> VmResult<u8>

Try to coerce value into a byte.

source

pub fn into_byte(self) -> VmResult<u8>

Try to coerce value into a byte.

source

pub fn as_char(&self) -> VmResult<char>

Try to coerce value into a character.

source

pub fn into_char(self) -> VmResult<char>

Try to coerce value into a character.

source

pub fn as_integer(&self) -> VmResult<i64>

Try to coerce value into an integer.

source

pub fn into_integer(self) -> VmResult<i64>

Try to coerce value into an integer.

source

pub fn as_float(&self) -> VmResult<f64>

Try to coerce value into a float.

source

pub fn into_float(self) -> VmResult<f64>

Try to coerce value into a float.

source

pub fn as_type(&self) -> VmResult<Type>

Try to coerce value into a type.

source

pub fn into_type(self) -> VmResult<Type>

Try to coerce value into a type.

source

pub fn as_usize(&self) -> VmResult<usize>

Try to coerce value into a usize.

source

pub fn into_usize(self) -> VmResult<usize>

Try to coerce value into a usize.

source

pub fn as_ordering(&self) -> VmResult<Ordering>

Try to coerce value into an Ordering.

source

pub fn into_ordering(self) -> VmResult<Ordering>

Try to coerce value into an Ordering.

source

pub fn into_result(self) -> VmResult<Shared<Result<Value, Value>>>

Try to coerce value into a result.

source

pub fn as_result(&self) -> VmResult<&Shared<Result<Value, Value>>>

Try to coerce value into a result.

source

pub fn into_generator(self) -> VmResult<Shared<Generator<Vm>>>

Try to coerce value into a generator.

source

pub fn into_stream(self) -> VmResult<Shared<Stream<Vm>>>

Try to coerce value into a stream.

source

pub fn into_generator_state(self) -> VmResult<Shared<GeneratorState>>

Try to coerce value into a future.

source

pub fn into_option(self) -> VmResult<Shared<Option<Value>>>

Try to coerce value into an option.

source

pub fn into_string(self) -> VmResult<Shared<String>>

Try to coerce value into a string.

source

pub fn into_bytes(self) -> VmResult<Shared<Bytes>>

Try to coerce value into bytes.

source

pub fn into_vec(self) -> VmResult<Shared<Vec>>

Try to coerce value into a vector.

source

pub fn into_tuple(self) -> VmResult<Shared<OwnedTuple>>

Try to coerce value into a tuple.

source

pub fn into_object(self) -> VmResult<Shared<Object>>

Try to coerce value into an object.

source

pub fn into_range_from(self) -> VmResult<Shared<RangeFrom>>

Try to coerce value into a RangeFrom.

source

pub fn into_range_full(self) -> VmResult<Shared<RangeFull>>

Try to coerce value into a RangeFull.

source

pub fn into_range_to_inclusive(self) -> VmResult<Shared<RangeToInclusive>>

Try to coerce value into a RangeToInclusive.

source

pub fn into_range_inclusive(self) -> VmResult<Shared<RangeInclusive>>

Try to coerce value into a RangeInclusive.

source

pub fn into_range_to(self) -> VmResult<Shared<RangeTo>>

Try to coerce value into a RangeTo.

source

pub fn into_range(self) -> VmResult<Shared<Range>>

Try to coerce value into a Range.

source

pub fn into_control_flow(self) -> VmResult<Shared<ControlFlow>>

Try to coerce value into a ControlFlow.

source

pub fn into_function(self) -> VmResult<Shared<Function>>

Try to coerce value into a function pointer.

source

pub fn into_format(self) -> VmResult<Shared<Format>>

Try to coerce value into a format spec.

source

pub fn into_iterator(self) -> VmResult<Shared<Iterator>>

Try to coerce value into an iterator.

source

pub fn into_any(self) -> VmResult<Shared<AnyObj>>

Try to coerce value into an opaque value.

source

pub fn into_any_ptr<T>(self) -> VmResult<(NonNull<T>, RawRef)>
where T: Any,

Try to coerce value into a ref and an associated guard.

§Safety

This coerces a strong guard to the value into its raw components.

It is up to the caller to ensure that the returned pointer does not outlive the returned guard, not the virtual machine the value belongs to.

source

pub fn into_any_mut<T>(self) -> VmResult<(NonNull<T>, RawMut)>
where T: Any,

Try to coerce value into a ref and an associated guard.

§Safety

This coerces a strong guard to the value into its raw components.

It is up to the caller to ensure that the returned pointer does not outlive the returned guard, not the virtual machine the value belongs to.

source

pub fn type_hash(&self) -> Result<Hash, VmError>

Get the type hash for the current value.

One notable feature is that the type of a variant is its container enum, and not the type hash of the variant itself.

source

pub fn type_info(&self) -> VmResult<TypeInfo>

Get the type information for the current value.

source

pub fn partial_eq(a: &Value, b: &Value) -> VmResult<bool>

Perform a partial equality test between two values.

This is the basis for the eq operation (partial_eq / ‘==’).

External types will use the Protocol::PARTIAL_EQ protocol when invoked through this function.

§Errors

This function will error if called outside of a virtual machine context.

source

pub fn hash(&self, hasher: &mut Hasher) -> VmResult<()>

Hash the current value.

source

pub fn eq(&self, b: &Value) -> VmResult<bool>

Perform a total equality test between two values.

This is the basis for the eq operation (==).

External types will use the Protocol::EQ protocol when invoked through this function.

§Errors

This function will error if called outside of a virtual machine context.

source

pub fn partial_cmp(a: &Value, b: &Value) -> VmResult<Option<Ordering>>

Perform a partial ordering comparison between two values.

This is the basis for the comparison operation.

External types will use the Protocol::PARTIAL_CMP protocol when invoked through this function.

§Errors

This function will error if called outside of a virtual machine context.

source

pub fn cmp(a: &Value, b: &Value) -> VmResult<Ordering>

Perform a total ordering comparison between two values.

This is the basis for the comparison operation (cmp).

External types will use the Protocol::CMP protocol when invoked through this function.

§Errors

This function will error if called outside of a virtual machine context.

Trait Implementations§

source§

impl Clone for Value

source§

fn clone(&self) -> Value

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Value

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Value

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Value

Deserialize implementation for value pointers.

source§

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<()> for Value

source§

fn from((): ()) -> Self

Converts to this type from the input type.
source§

impl From<Shared<AnyObj>> for Value

source§

fn from(value: Shared<AnyObj>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<Bytes>> for Value

source§

fn from(value: Shared<Bytes>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<ControlFlow>> for Value

source§

fn from(value: Shared<ControlFlow>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<EmptyStruct>> for Value

source§

fn from(value: Shared<EmptyStruct>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<Format>> for Value

source§

fn from(value: Shared<Format>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<Function>> for Value

source§

fn from(value: Shared<Function>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<Future>> for Value

source§

fn from(value: Shared<Future>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<Generator<Vm>>> for Value

source§

fn from(value: Shared<Generator<Vm>>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<GeneratorState>> for Value

source§

fn from(value: Shared<GeneratorState>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<Iterator>> for Value

source§

fn from(value: Shared<Iterator>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<Object>> for Value

source§

fn from(value: Shared<Object>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<Option<Value>>> for Value

source§

fn from(value: Shared<Option<Value>>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<OwnedTuple>> for Value

source§

fn from(value: Shared<OwnedTuple>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<Range>> for Value

source§

fn from(value: Shared<Range>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<RangeFrom>> for Value

source§

fn from(value: Shared<RangeFrom>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<RangeFull>> for Value

source§

fn from(value: Shared<RangeFull>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<RangeInclusive>> for Value

source§

fn from(value: Shared<RangeInclusive>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<RangeTo>> for Value

source§

fn from(value: Shared<RangeTo>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<RangeToInclusive>> for Value

source§

fn from(value: Shared<RangeToInclusive>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<Result<Value, Value>>> for Value

source§

fn from(value: Shared<Result<Value, Value>>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<Stream<Vm>>> for Value

source§

fn from(value: Shared<Stream<Vm>>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<String>> for Value

source§

fn from(value: Shared<String>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<Struct>> for Value

source§

fn from(value: Shared<Struct>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<TupleStruct>> for Value

source§

fn from(value: Shared<TupleStruct>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<Variant>> for Value

source§

fn from(value: Shared<Variant>) -> Self

Converts to this type from the input type.
source§

impl From<Shared<Vec>> for Value

source§

fn from(value: Shared<Vec>) -> Self

Converts to this type from the input type.
source§

impl From<Type> for Value

source§

fn from(value: Type) -> Self

Converts to this type from the input type.
source§

impl From<bool> for Value

source§

fn from(value: bool) -> Self

Converts to this type from the input type.
source§

impl From<char> for Value

source§

fn from(value: char) -> Self

Converts to this type from the input type.
source§

impl From<f64> for Value

source§

fn from(value: f64) -> Self

Converts to this type from the input type.
source§

impl From<i64> for Value

source§

fn from(value: i64) -> Self

Converts to this type from the input type.
source§

impl From<u8> for Value

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl FromValue for Value

source§

fn from_value(value: Value) -> VmResult<Self>

Try to convert to the given type, from the given value.
source§

impl MaybeTypeOf for Value

source§

fn maybe_type_of() -> Option<FullTypeOf>

Type information for the given type.
source§

impl Serialize for Value

Serialize implementation for value pointers.

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl ToValue for &Value

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl ToValue for Value

source§

fn to_value(self) -> VmResult<Value>

Convert into a value.
source§

impl TryClone for Value

source§

fn try_clone(&self) -> Result<Self>

Try to clone the current value, raising an allocation error if it’s unsuccessful.
source§

fn try_clone_from(&mut self, source: &Self) -> Result<(), Error>

Performs copy-assignment from source. Read more
source§

impl TryFrom<AnyObj> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: AnyObj) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<Bytes> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Bytes) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<ControlFlow> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: ControlFlow) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<EmptyStruct> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: EmptyStruct) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<Format> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Format) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<Function> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Function) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<Future> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Future) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<Generator<Vm>> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Generator<Vm>) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<GeneratorState> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: GeneratorState) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<Iterator> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Iterator) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<Object> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Object) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<OwnedTuple> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: OwnedTuple) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<Range> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Range) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<RangeFrom> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: RangeFrom) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<RangeFull> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: RangeFull) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<RangeInclusive> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: RangeInclusive) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<RangeTo> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: RangeTo) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<RangeToInclusive> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: RangeToInclusive) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<Stream<Vm>> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Stream<Vm>) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<String> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: String) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<Struct> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Struct) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<TupleStruct> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: TupleStruct) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<Variant> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Variant) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<Vec> for Value

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Vec) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFromIteratorIn<Value, Global> for Stack

source§

fn try_from_iter_in<T: IntoIterator<Item = Value>>( iter: T, alloc: Global ) -> Result<Self>

Creates a value from an iterator within an allocator.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Value

§

impl !Send for Value

§

impl !Sync for Value

§

impl Unpin for Value

§

impl !UnwindSafe for Value

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> TryToOwned for T
where T: TryClone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn try_to_owned(&self) -> Result<T, Error>

Creates owned data from borrowed data, usually by cloning. Read more
source§

impl<T> UnsafeToValue for T
where T: ToValue,

§

type Guard = ()

The type used to guard the unsafe value conversion.
source§

unsafe fn unsafe_to_value( self ) -> VmResult<(Value, <T as UnsafeToValue>::Guard)>

Convert into a value. Read more
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,