pub struct Unchanged;Expand description
A marker result that keeps the original value.
A map or mutation callback returns Unchanged, usually as
Unchanged.into(), to keep the value it was given without retaining or
cloning it. A pre-order map still descends into the original value’s
children.
§Examples
use tvm_ffi::{Any, Unchanged, UnchangedOr};
let result: UnchangedOr<Any> = Unchanged.into();
assert!(result.is_unchanged());Trait Implementations§
Source§impl AnyCompatible for Unchanged
impl AnyCompatible for Unchanged
Source§unsafe fn copy_to_any_view(_src: &Self, data: &mut TVMFFIAny)
unsafe fn copy_to_any_view(_src: &Self, data: &mut TVMFFIAny)
Source§unsafe fn move_to_any(src: Self, data: &mut TVMFFIAny)
unsafe fn move_to_any(src: Self, data: &mut TVMFFIAny)
Source§unsafe fn check_any_strict(data: &TVMFFIAny) -> bool
unsafe fn check_any_strict(data: &TVMFFIAny) -> bool
Source§unsafe fn copy_from_any_view_after_check(_data: &TVMFFIAny) -> Self
unsafe fn copy_from_any_view_after_check(_data: &TVMFFIAny) -> Self
Copy a
Self out of a cell that holds one, retaining any object. Read moreSource§unsafe fn move_from_any_after_check(_data: &mut TVMFFIAny) -> Self
unsafe fn move_from_any_after_check(_data: &mut TVMFFIAny) -> Self
Move a
Self out of an owning cell that holds one. Read moreSource§unsafe fn try_cast_from_any_view(data: &TVMFFIAny) -> Result<Self, ()>
unsafe fn try_cast_from_any_view(data: &TVMFFIAny) -> Result<Self, ()>
Convert
data into a Self by the FFI rules, such as an integer into a
float; Err if it does not convert. Read moreSource§fn type_str() -> String
fn type_str() -> String
The type name in conversion errors and type schemas, such as
int,
ffi.String or Array<int>.Source§fn type_schema() -> String
fn type_schema() -> String
The type schema of the type: the JSON object that describes it, which
the type schemas of functions and fields embed. Read more
Source§unsafe fn is_undefined(field: *const Self) -> bool
unsafe fn is_undefined(field: *const Self) -> bool
Whether
field, which holds a value of this type or all-zero bytes,
holds all-zero bytes that are no value of this type, as a null object
reference, a string of type index None or a zero device type: a field
that a creator left undefined for reflection to set. An undefined field
is no value; a nullable reference is Option<T>, whose None is a
defined value. Read moreSource§fn get_mismatch_type_info(data: &TVMFFIAny) -> String
fn get_mismatch_type_info(data: &TVMFFIAny) -> String
The name of the mismatched value
data in conversion errors; by
default its runtime type key.impl Copy for Unchanged
impl Eq for Unchanged
impl StructuralPartialEq for Unchanged
Auto Trait Implementations§
impl Freeze for Unchanged
impl RefUnwindSafe for Unchanged
impl Send for Unchanged
impl Sync for Unchanged
impl Unpin for Unchanged
impl UnsafeUnpin for Unchanged
impl UnwindSafe for Unchanged
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