pub enum InteropError {
Show 25 variants
NotImplemented,
ValueMismatch {
value: Box<ScriptValue>,
expected: Box<TypeId>,
},
LengthMismatch {
expected: usize,
got: usize,
},
FailedFromReflect {
type_id: Box<Option<TypeId>>,
reason: Box<String>,
},
TypeMismatch {
expected: Box<TypeId>,
got: Box<Option<TypeId>>,
},
StringTypeMismatch {
expected: Box<String>,
got: Box<Option<TypeId>>,
},
CannotClaimAccess {
base: Box<WorldAccessRangeWithDisplay>,
context: Box<Cow<'static, str>>,
},
Invariant(Box<String>),
UnregisteredComponentOrResourceType {
type_: Box<TypeId>,
},
MissingResource {
type_: Box<TypeId>,
},
UnsupportedOperation {
base: Box<Option<TypeId>>,
value: Box<Option<ReflectWrapper>>,
operation: Box<String>,
},
MissingTypeData {
type_id: Box<TypeId>,
type_data: Box<String>,
},
MissingEntity(Entity),
FunctionInteropError {
function_name: Box<String>,
on: Box<Namespace>,
error: Box<InteropError>,
context: Box<Option<FunctionCallContext>>,
},
FunctionArgConversionError {
argument: Box<String>,
error: Box<InteropError>,
},
ArgumentCountMismatch {
expected: usize,
got: usize,
},
GarbageCollectedAllocation {
reference: Box<ReflectReference>,
},
UnregisteredReflectBase {
base: Box<ReflectBaseType>,
},
ReflectionPathError {
error: Box<String>,
reflected: Option<Box<ReflectReference>>,
},
CouldNotDowncastReference {
to: Box<TypeId>,
reference: Box<ReflectReference>,
},
MissingSchedule {
schedule_name: &'static str,
},
InvalidIndex {
index: Box<ScriptValue>,
reason: Box<String>,
},
MissingWorld,
External(ExternalError),
WithContext(Box<Cow<'static, str>>, Box<InteropError>),
}Expand description
An error occurring when converting between rust and a script context.
Variants§
NotImplemented
The given feature is not implemented
ValueMismatch
A script value was of the wrong type
LengthMismatch
The length of a list like structure was wrong
FailedFromReflect
Something failed when converting from a reflect
Fields
TypeMismatch
A type mismatch occurred
StringTypeMismatch
A type mismatch occurred, but with a string representation of the expected type
CannotClaimAccess
Could not claim access to a value
Fields
base: Box<WorldAccessRangeWithDisplay>The id of the access
Invariant(Box<String>)
An invariant was broken
UnregisteredComponentOrResourceType
An unregistered component or resource type was used
MissingResource
A resource is registered, but not inserted
UnsupportedOperation
An unsupported operation was performed
Fields
value: Box<Option<ReflectWrapper>>The value of the operation
MissingTypeData
Some type data was missing
Fields
MissingEntity(Entity)
An entity was missing
FunctionInteropError
An error occurred in a function
Fields
error: Box<InteropError>The error that occurred
context: Box<Option<FunctionCallContext>>The context at the time of the call
FunctionArgConversionError
An error occurred when converting a function argument
Fields
error: Box<InteropError>The error that occurred
ArgumentCountMismatch
The number of arguments in a function call was wrong
GarbageCollectedAllocation
A garbage collected allocation was used
Fields
reference: Box<ReflectReference>The reference to the allocation
UnregisteredReflectBase
An unregistered reflect base was used
Fields
base: Box<ReflectBaseType>The base that was unregistered
ReflectionPathError
An error occurred when using a reflection path
Fields
reflected: Option<Box<ReflectReference>>The reflected value
CouldNotDowncastReference
Could not downcast a reference
Fields
reference: Box<ReflectReference>The reference to downcast
MissingSchedule
A schedule was missing
InvalidIndex
An invalid index was used
Fields
index: Box<ScriptValue>The index that was invalid
MissingWorld
The world was missing
External(ExternalError)
An external error occurred
WithContext(Box<Cow<'static, str>>, Box<InteropError>)
an error enriched with some contextual information
Implementations§
Source§impl InteropError
impl InteropError
Sourcepub fn unwrap_context(self) -> (Vec<Cow<'static, str>>, InteropError)
pub fn unwrap_context(self) -> (Vec<Cow<'static, str>>, InteropError)
Strips outer context layers from the error, returning all contexts and the base error
Sourcepub fn with_context(self, context: impl Into<Cow<'static, str>>) -> Self
pub fn with_context(self, context: impl Into<Cow<'static, str>>) -> Self
Adds context to an existing error
Sourcepub fn external(error: impl Error + Send + Sync + 'static) -> Self
pub fn external(error: impl Error + Send + Sync + 'static) -> Self
Creates a new external error.
Sourcepub fn external_boxed(error: Box<dyn Error + Send + Sync + 'static>) -> Self
pub fn external_boxed(error: Box<dyn Error + Send + Sync + 'static>) -> Self
Creates a new external error from a boxed error.
Sourcepub fn value_mismatch(expected: TypeId, value: ScriptValue) -> Self
pub fn value_mismatch(expected: TypeId, value: ScriptValue) -> Self
Creates a new value mismatch error.
Sourcepub fn length_mismatch(expected: usize, got: usize) -> Self
pub fn length_mismatch(expected: usize, got: usize) -> Self
Creates a new length mismatch error.
Sourcepub fn failed_from_reflect(
type_id: Option<TypeId>,
reason: impl Display,
) -> Self
pub fn failed_from_reflect( type_id: Option<TypeId>, reason: impl Display, ) -> Self
Creates a new failed from reflect error.
Sourcepub fn type_mismatch(expected: TypeId, got: Option<TypeId>) -> Self
pub fn type_mismatch(expected: TypeId, got: Option<TypeId>) -> Self
Creates a new type mismatch error.
Sourcepub fn string_type_mismatch(expected: String, got: Option<TypeId>) -> Self
pub fn string_type_mismatch(expected: String, got: Option<TypeId>) -> Self
Creates a new string type mismatch error.
Sourcepub fn cannot_claim_access(
base: WorldAccessRange,
context: impl Into<Cow<'static, str>>,
) -> Self
pub fn cannot_claim_access( base: WorldAccessRange, context: impl Into<Cow<'static, str>>, ) -> Self
Creates a new cannot claim access error.
Sourcepub fn unregistered_component_or_resource_type(type_id: TypeId) -> Self
pub fn unregistered_component_or_resource_type(type_id: TypeId) -> Self
Creates a new unregistered component or resource type error.
Sourcepub fn missing_resource(type_id: TypeId) -> Self
pub fn missing_resource(type_id: TypeId) -> Self
Creates a new missing resource type error.
Sourcepub fn unsupported_operation(
base: Option<TypeId>,
value: Option<Box<dyn PartialReflect>>,
op: impl Display,
) -> Self
pub fn unsupported_operation( base: Option<TypeId>, value: Option<Box<dyn PartialReflect>>, op: impl Display, ) -> Self
Creates a new unsupported operation error.
Sourcepub fn missing_type_data(type_id: TypeId, type_data: String) -> Self
pub fn missing_type_data(type_id: TypeId, type_data: String) -> Self
Creates a new missing type data error.
Sourcepub fn missing_entity(entity: Entity) -> Self
pub fn missing_entity(entity: Entity) -> Self
Creates a new missing entity error.
Sourcepub fn reflect_apply_error(e: ApplyError) -> Self
pub fn reflect_apply_error(e: ApplyError) -> Self
Creates a new reflect apply error.
Sourcepub fn function_interop_error(
function_name: impl Display,
on: Namespace,
error: InteropError,
context: Option<FunctionCallContext>,
) -> Self
pub fn function_interop_error( function_name: impl Display, on: Namespace, error: InteropError, context: Option<FunctionCallContext>, ) -> Self
Creates a new function interop error.
Sourcepub fn function_arg_conversion_error(
argument: String,
error: InteropError,
) -> Self
pub fn function_arg_conversion_error( argument: String, error: InteropError, ) -> Self
Thrown when an error happens during argument conversion in a function call
Sourcepub fn argument_count_mismatch(expected: usize, got: usize) -> Self
pub fn argument_count_mismatch(expected: usize, got: usize) -> Self
Thrown when the number of arguments in a function call does not match.
Sourcepub fn garbage_collected_allocation(reference: ReflectReference) -> Self
pub fn garbage_collected_allocation(reference: ReflectReference) -> Self
Creates a new garbage collected allocation error.
Sourcepub fn unregistered_base(base: ReflectBaseType) -> Self
pub fn unregistered_base(base: ReflectBaseType) -> Self
Creates a new unregistered base error.
Sourcepub fn reflection_path_error(
error: String,
reflected: Option<ReflectReference>,
) -> Self
pub fn reflection_path_error( error: String, reflected: Option<ReflectReference>, ) -> Self
Creates a new reflection path error.
Sourcepub fn could_not_downcast(reference: ReflectReference, to: TypeId) -> Self
pub fn could_not_downcast(reference: ReflectReference, to: TypeId) -> Self
Creates a new could not downcast error.
Sourcepub fn missing_schedule(schedule_name: &'static str) -> Self
pub fn missing_schedule(schedule_name: &'static str) -> Self
Creates a new missing schedule error.
Sourcepub fn invalid_index(index: ScriptValue, reason: impl Into<String>) -> Self
pub fn invalid_index(index: ScriptValue, reason: impl Into<String>) -> Self
Creates a new invalid index error.
Sourcepub fn missing_world() -> Self
pub fn missing_world() -> Self
Creates a new missing world error.
Sourcepub fn missing_function(
function_name: impl Display,
on: Namespace,
context: Option<FunctionCallContext>,
) -> Self
pub fn missing_function( function_name: impl Display, on: Namespace, context: Option<FunctionCallContext>, ) -> Self
Creates a new missing function error.
Trait Implementations§
Source§impl Clone for InteropError
impl Clone for InteropError
Source§fn clone(&self) -> InteropError
fn clone(&self) -> InteropError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InteropError
impl Debug for InteropError
Source§impl DebugWithTypeInfo for InteropError
impl DebugWithTypeInfo for InteropError
Source§fn to_string_with_type_info(
&self,
f: &mut Formatter<'_>,
type_info_provider: Option<&WorldAccessGuard<'_>>,
) -> Result
fn to_string_with_type_info( &self, f: &mut Formatter<'_>, type_info_provider: Option<&WorldAccessGuard<'_>>, ) -> Result
Source§impl Display for InteropError
impl Display for InteropError
Source§impl DisplayWithTypeInfo for InteropError
impl DisplayWithTypeInfo for InteropError
Source§fn display_with_type_info(
&self,
f: &mut Formatter<'_>,
type_info_provider: Option<&WorldGuard<'_>>,
) -> Result
fn display_with_type_info( &self, f: &mut Formatter<'_>, type_info_provider: Option<&WorldGuard<'_>>, ) -> Result
Source§impl Error for InteropError
impl Error for InteropError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<DynWorldAccessError> for InteropError
impl From<DynWorldAccessError> for InteropError
Source§fn from(value: DynWorldAccessError) -> Self
fn from(value: DynWorldAccessError) -> Self
Source§impl From<InteropError> for ScriptValue
impl From<InteropError> for ScriptValue
Source§fn from(value: InteropError) -> Self
fn from(value: InteropError) -> Self
Source§impl FromReflect for InteropError
impl FromReflect for InteropError
Source§fn from_reflect(reflect: &dyn PartialReflect) -> Option<Self>
fn from_reflect(reflect: &dyn PartialReflect) -> Option<Self>
Self from a reflected value.Source§fn take_from_reflect(
reflect: Box<dyn PartialReflect>,
) -> Result<Self, Box<dyn PartialReflect>>
fn take_from_reflect( reflect: Box<dyn PartialReflect>, ) -> Result<Self, Box<dyn PartialReflect>>
Self using,
constructing the value using from_reflect if that fails. Read moreSource§impl GetTypeDependencies for InteropError
impl GetTypeDependencies for InteropError
Source§type Underlying = InteropError
type Underlying = InteropError
Self
However some types might be facades for other types, in which case this will be the underlying typeSource§fn register_type_dependencies(registry: &mut TypeRegistry)
fn register_type_dependencies(registry: &mut TypeRegistry)
TypeRegistry.Source§impl GetTypeRegistration for InteropError
impl GetTypeRegistration for InteropError
Source§fn get_type_registration() -> TypeRegistration
fn get_type_registration() -> TypeRegistration
TypeRegistration for this type.Source§fn register_type_dependencies(_registry: &mut TypeRegistry)
fn register_type_dependencies(_registry: &mut TypeRegistry)
Source§impl IntoScript for InteropError
impl IntoScript for InteropError
Source§fn into_script(
self,
_world: WorldGuard<'_>,
) -> Result<ScriptValue, InteropError>
fn into_script( self, _world: WorldGuard<'_>, ) -> Result<ScriptValue, InteropError>
ScriptValue.Source§fn into_script_inline_error(self, world: WorldGuard<'_>) -> ScriptValuewhere
Self: Sized,
fn into_script_inline_error(self, world: WorldGuard<'_>) -> ScriptValuewhere
Self: Sized,
ScriptValue, returning an error as a ScriptValue if an error occurs.Source§impl PartialReflect for InteropError
impl PartialReflect for InteropError
Source§fn get_represented_type_info(&self) -> Option<&'static TypeInfo>
fn get_represented_type_info(&self) -> Option<&'static TypeInfo>
Source§fn to_dynamic(&self) -> Box<dyn PartialReflect>
fn to_dynamic(&self) -> Box<dyn PartialReflect>
Source§fn try_apply(&mut self, value: &dyn PartialReflect) -> Result<(), ApplyError>
fn try_apply(&mut self, value: &dyn PartialReflect) -> Result<(), ApplyError>
Source§fn reflect_kind(&self) -> ReflectKind
fn reflect_kind(&self) -> ReflectKind
Source§fn reflect_ref(&self) -> ReflectRef<'_>
fn reflect_ref(&self) -> ReflectRef<'_>
Source§fn reflect_mut(&mut self) -> ReflectMut<'_>
fn reflect_mut(&mut self) -> ReflectMut<'_>
Source§fn reflect_owned(self: Box<Self>) -> ReflectOwned
fn reflect_owned(self: Box<Self>) -> ReflectOwned
Source§fn try_into_reflect(
self: Box<Self>,
) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>
fn try_into_reflect( self: Box<Self>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>
Source§fn try_as_reflect(&self) -> Option<&dyn Reflect>
fn try_as_reflect(&self) -> Option<&dyn Reflect>
Source§fn try_as_reflect_mut(&mut self) -> Option<&mut dyn Reflect>
fn try_as_reflect_mut(&mut self) -> Option<&mut dyn Reflect>
Source§fn into_partial_reflect(self: Box<Self>) -> Box<dyn PartialReflect>
fn into_partial_reflect(self: Box<Self>) -> Box<dyn PartialReflect>
Source§fn as_partial_reflect(&self) -> &dyn PartialReflect
fn as_partial_reflect(&self) -> &dyn PartialReflect
Source§fn as_partial_reflect_mut(&mut self) -> &mut dyn PartialReflect
fn as_partial_reflect_mut(&mut self) -> &mut dyn PartialReflect
Source§fn apply(&mut self, value: &(dyn PartialReflect + 'static))
fn apply(&mut self, value: &(dyn PartialReflect + 'static))
Source§fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>
fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>
Self using reflection. Read moreSource§fn reflect_clone_and_take<T>(&self) -> Result<T, ReflectCloneError>
fn reflect_clone_and_take<T>(&self) -> Result<T, ReflectCloneError>
PartialReflect, combines reflect_clone and
take in a useful fashion, automatically constructing an appropriate
ReflectCloneError if the downcast fails.Source§fn reflect_hash(&self) -> Option<u64>
fn reflect_hash(&self) -> Option<u64>
Source§fn reflect_partial_eq(
&self,
_value: &(dyn PartialReflect + 'static),
) -> Option<bool>
fn reflect_partial_eq( &self, _value: &(dyn PartialReflect + 'static), ) -> Option<bool>
Source§fn reflect_partial_cmp(
&self,
_value: &(dyn PartialReflect + 'static),
) -> Option<Ordering>
fn reflect_partial_cmp( &self, _value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>
Source§fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Source§fn is_dynamic(&self) -> bool
fn is_dynamic(&self) -> bool
Source§impl Reflect for InteropError
impl Reflect for InteropError
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
&mut dyn Any. Read moreSource§fn into_reflect(self: Box<Self>) -> Box<dyn Reflect>
fn into_reflect(self: Box<Self>) -> Box<dyn Reflect>
Source§fn as_reflect(&self) -> &dyn Reflect
fn as_reflect(&self) -> &dyn Reflect
Source§fn as_reflect_mut(&mut self) -> &mut dyn Reflect
fn as_reflect_mut(&mut self) -> &mut dyn Reflect
Source§impl TypePath for InteropError
impl TypePath for InteropError
Source§fn type_path() -> &'static str
fn type_path() -> &'static str
Source§fn short_type_path() -> &'static str
fn short_type_path() -> &'static str
Source§fn type_ident() -> Option<&'static str>
fn type_ident() -> Option<&'static str>
Source§fn crate_name() -> Option<&'static str>
fn crate_name() -> Option<&'static str>
Auto Trait Implementations§
impl !RefUnwindSafe for InteropError
impl !UnwindSafe for InteropError
impl Freeze for InteropError
impl Send for InteropError
impl Sync for InteropError
impl Unpin for InteropError
impl UnsafeUnpin for InteropError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DynamicTypePath for Twhere
T: TypePath,
impl<T> DynamicTypePath for Twhere
T: TypePath,
Source§fn reflect_type_path(&self) -> &str
fn reflect_type_path(&self) -> &str
TypePath::type_path.Source§fn reflect_short_type_path(&self) -> &str
fn reflect_short_type_path(&self) -> &str
Source§fn reflect_type_ident(&self) -> Option<&str>
fn reflect_type_ident(&self) -> Option<&str>
TypePath::type_ident.Source§fn reflect_crate_name(&self) -> Option<&str>
fn reflect_crate_name(&self) -> Option<&str>
TypePath::crate_name.Source§fn reflect_module_path(&self) -> Option<&str>
fn reflect_module_path(&self) -> Option<&str>
Source§impl<T> DynamicTyped for Twhere
T: Typed,
impl<T> DynamicTyped for Twhere
T: Typed,
Source§fn reflect_type_info(&self) -> &'static TypeInfo
fn reflect_type_info(&self) -> &'static TypeInfo
Typed::type_info.Source§impl<T> GetPath for T
impl<T> GetPath for T
Source§fn reflect_path<'p>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>
fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>
path. Read moreSource§fn reflect_path_mut<'p>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>
fn reflect_path_mut<'p>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>
path. Read moreSource§fn path<'p, T>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&T, ReflectPathError<'p>>where
T: Reflect,
fn path<'p, T>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&T, ReflectPathError<'p>>where
T: Reflect,
path. Read moreSource§fn path_mut<'p, T>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut T, ReflectPathError<'p>>where
T: Reflect,
fn path_mut<'p, T>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut T, ReflectPathError<'p>>where
T: Reflect,
path. Read moreSource§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoNamespace for Twhere
T: 'static + ?Sized,
impl<T> IntoNamespace for Twhere
T: 'static + ?Sized,
Source§fn into_namespace() -> Namespace
fn into_namespace() -> Namespace
NamespaceSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Source§impl<T> PartialReflectExt for Twhere
T: PartialReflect + ?Sized,
impl<T> PartialReflectExt for Twhere
T: PartialReflect + ?Sized,
Source§fn from_reflect_or_clone(
reflect: &(dyn PartialReflect + 'static),
world: WorldAccessGuard<'_>,
) -> Result<Box<dyn PartialReflect>, InteropError>
fn from_reflect_or_clone( reflect: &(dyn PartialReflect + 'static), world: WorldAccessGuard<'_>, ) -> Result<Box<dyn PartialReflect>, InteropError>
Try creating an owned partial reflect from a reference. Will try using ReflectFromReflect first, and if that fails, will clone the value using [PartialReflect::clone_value].
Source§fn is_type(&self, crate_name: Option<&str>, type_ident: &str) -> bool
fn is_type(&self, crate_name: Option<&str>, type_ident: &str) -> bool
Source§fn expect_type(
&self,
crate_name: Option<&str>,
type_ident: &str,
) -> Result<(), InteropError>
fn expect_type( &self, crate_name: Option<&str>, type_ident: &str, ) -> Result<(), InteropError>
PartialReflectExt::is_type but returns an appropriate error if the type is not the expected one.Source§fn as_option(
&self,
) -> Result<Option<&(dyn PartialReflect + 'static)>, InteropError>
fn as_option( &self, ) -> Result<Option<&(dyn PartialReflect + 'static)>, InteropError>
Source§fn as_option_mut(
&mut self,
) -> Result<Option<&mut (dyn PartialReflect + 'static)>, InteropError>
fn as_option_mut( &mut self, ) -> Result<Option<&mut (dyn PartialReflect + 'static)>, InteropError>
PartialReflectExt::as_option but for mutable references.Source§fn as_list(
&self,
) -> Result<impl Iterator<Item = &(dyn PartialReflect + 'static)>, InteropError>
fn as_list( &self, ) -> Result<impl Iterator<Item = &(dyn PartialReflect + 'static)>, InteropError>
Source§fn set_as_list<F>(
&mut self,
other: Box<dyn PartialReflect>,
apply: F,
) -> Result<(), InteropError>where
F: Fn(&mut (dyn PartialReflect + 'static), &(dyn PartialReflect + 'static)) -> Result<(), InteropError>,
fn set_as_list<F>(
&mut self,
other: Box<dyn PartialReflect>,
apply: F,
) -> Result<(), InteropError>where
F: Fn(&mut (dyn PartialReflect + 'static), &(dyn PartialReflect + 'static)) -> Result<(), InteropError>,
Source§fn as_usize(&self) -> Result<usize, InteropError>
fn as_usize(&self) -> Result<usize, InteropError>
Source§fn try_insert_boxed(
&mut self,
key: Box<dyn PartialReflect>,
value: Box<dyn PartialReflect>,
) -> Result<(), InteropError>
fn try_insert_boxed( &mut self, key: Box<dyn PartialReflect>, value: Box<dyn PartialReflect>, ) -> Result<(), InteropError>
Source§fn try_push_boxed(
&mut self,
value: Box<dyn PartialReflect>,
) -> Result<(), InteropError>
fn try_push_boxed( &mut self, value: Box<dyn PartialReflect>, ) -> Result<(), InteropError>
end of the container.
For lists, this is the length of the list.
For sets, this will simply insert the value into the set.
For maps, there is no natural end, so the push will error out