pub struct Resource<T>where
T: Debug,{ /* private fields */ }Expand description
A resource of particular data type. It is a typed wrapper around UntypedResource which
does type checks at runtime. See UntypedResource for more info.
§Default State
Default state of the resource will be ResourceState::Ok with T::default.
Implementations§
Source§impl<T> Resource<T>where
T: TypedResourceData,
impl<T> Resource<T>where
T: TypedResourceData,
Sourcepub fn summary(&self) -> String
pub fn summary(&self) -> String
Create a summary of this resource handle, wht UUID, embedded/external, and Ok, Pending, Error, etc.
Sourcepub fn new_pending(uuid: Uuid, kind: ResourceKind) -> Resource<T> ⓘ
pub fn new_pending(uuid: Uuid, kind: ResourceKind) -> Resource<T> ⓘ
Creates new resource in pending state.
Sourcepub fn new_ok(resource_uuid: Uuid, kind: ResourceKind, data: T) -> Resource<T> ⓘ
pub fn new_ok(resource_uuid: Uuid, kind: ResourceKind, data: T) -> Resource<T> ⓘ
Creates new resource in ok state (fully loaded).
Sourcepub fn new_embedded(data: T) -> Resource<T> ⓘ
pub fn new_embedded(data: T) -> Resource<T> ⓘ
Creates a new embedded resource in ok state (fully loaded).
Sourcepub fn new_load_error(
kind: ResourceKind,
path: PathBuf,
error: LoadError,
) -> Resource<T> ⓘ
pub fn new_load_error( kind: ResourceKind, path: PathBuf, error: LoadError, ) -> Resource<T> ⓘ
Creates new resource in error state.
Sourcepub fn into_untyped(self) -> UntypedResource ⓘ
pub fn into_untyped(self) -> UntypedResource ⓘ
Converts self to internal value.
Sourcepub fn state(&self) -> ResourceHeaderGuard<'_, T>
pub fn state(&self) -> ResourceHeaderGuard<'_, T>
Locks internal mutex provides access to the state.
Sourcepub fn try_acquire_state(&self) -> Option<ResourceHeaderGuard<'_, T>>
pub fn try_acquire_state(&self) -> Option<ResourceHeaderGuard<'_, T>>
Tries to lock internal mutex provides access to the state.
Sourcepub fn header(&self) -> MutexGuard<'_, RawMutex, ResourceHeader>
pub fn header(&self) -> MutexGuard<'_, RawMutex, ResourceHeader>
Locks the resource and provides access to its header. See ResourceHeader docs for more info.
Sourcepub fn is_loading(&self) -> bool
pub fn is_loading(&self) -> bool
Returns true if the resource is still loading.
Sourcepub fn is_failed_to_load(&self) -> bool
pub fn is_failed_to_load(&self) -> bool
Returns true if the resource is failed to load.
Sourcepub fn kind(&self) -> ResourceKind
pub fn kind(&self) -> ResourceKind
Returns kind of the resource, if the resource is registered.
Sourcepub fn resource_uuid(&self) -> Uuid
pub fn resource_uuid(&self) -> Uuid
The UUID of the resource. All resources must have a UUID, even if they are not loaded because the UUID is how the resource manager knows the path to load from.
Sourcepub fn set_path(&mut self, new_kind: ResourceKind)
pub fn set_path(&mut self, new_kind: ResourceKind)
Sets a new kind of the resource.
Sourcepub fn data_ref(&self) -> ResourceDataRef<'_, T>
pub fn data_ref(&self) -> ResourceDataRef<'_, T>
Allows you to get a reference to the resource data. The returned object implements Deref
and DerefMut traits, and basically acts like a reference to the resource value.
§Panic
An attempt to dereference the returned object will result in panic if the resource is not
loaded yet, or there was a loading error. Usually this is ok because you should chain this
call like this resource.await?.data_ref(). Every resource implements Future trait,
and it returns Result, so if you’ll await the future then you’ll get Result, so call to
data_ref will be fine.
You can also use [ResourceDataRef::as_loaded_ref] and [ResourceDataRef::as_loaded_mut]
methods that perform checked access to the resource internals.
Trait Implementations§
Source§impl<T> AsRef<UntypedResource> for Resource<T>where
T: TypedResourceData,
impl<T> AsRef<UntypedResource> for Resource<T>where
T: TypedResourceData,
Source§fn as_ref(&self) -> &UntypedResource ⓘ
fn as_ref(&self) -> &UntypedResource ⓘ
Source§impl<T> Default for Resource<T>where
T: TypedResourceData,
impl<T> Default for Resource<T>where
T: TypedResourceData,
Source§impl<'de, T> Deserialize<'de> for Resource<T>where
T: Debug + TypedResourceData,
impl<'de, T> Deserialize<'de> for Resource<T>where
T: Debug + TypedResourceData,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Resource<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Resource<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl<T> From<UntypedResource> for Resource<T>where
T: TypedResourceData,
impl<T> From<UntypedResource> for Resource<T>where
T: TypedResourceData,
Source§impl<T> Future for Resource<T>where
T: TypedResourceData,
impl<T> Future for Resource<T>where
T: TypedResourceData,
Source§impl<T> Hash for Resource<T>where
T: TypedResourceData,
impl<T> Hash for Resource<T>where
T: TypedResourceData,
Source§impl HrirSphereResourceExt for Resource<HrirSphereResourceData>
impl HrirSphereResourceExt for Resource<HrirSphereResourceData>
Source§fn from_hrir_sphere(
hrir_sphere: HrirSphere,
kind: ResourceKind,
) -> Resource<HrirSphereResourceData> ⓘ
fn from_hrir_sphere( hrir_sphere: HrirSphere, kind: ResourceKind, ) -> Resource<HrirSphereResourceData> ⓘ
Source§impl<T> Into<UntypedResource> for Resource<T>where
T: TypedResourceData,
impl<T> Into<UntypedResource> for Resource<T>where
T: TypedResourceData,
Source§fn into(self) -> UntypedResource ⓘ
fn into(self) -> UntypedResource ⓘ
Source§impl IntoPrimitive<Resource<Texture>> for StyleProperty
impl IntoPrimitive<Resource<Texture>> for StyleProperty
Source§impl MaterialResourceExtension for Resource<Material>
impl MaterialResourceExtension for Resource<Material>
Source§impl<T> PartialEq for Resource<T>where
T: TypedResourceData,
impl<T> PartialEq for Resource<T>where
T: TypedResourceData,
Source§impl<T> Reflect for Resource<T>
impl<T> Reflect for Resource<T>
fn source_path() -> &'static str
fn try_clone_box(&self) -> Option<Box<dyn Reflect>>
fn type_name(&self) -> &'static str
fn derived_types() -> &'static [TypeId]
fn query_derived_types(&self) -> &'static [TypeId]
fn doc(&self) -> &'static str
Source§fn assembly_name(&self) -> &'static str
fn assembly_name(&self) -> &'static str
#[derive(Reflect)]) to ensure that this method will return correct assembly
name. In other words - there’s no guarantee, that any implementation other than proc-macro
will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME")
as an implementation.Source§fn type_assembly_name() -> &'static str
fn type_assembly_name() -> &'static str
#[derive(Reflect)]) to ensure that this method will return correct assembly
name. In other words - there’s no guarantee, that any implementation other than proc-macro
will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME")
as an implementation.fn fields_ref(&self, func: &mut dyn FnMut(&[FieldRef<'_, '_>]))
fn fields_mut(&mut self, func: &mut dyn FnMut(&mut [FieldMut<'_, '_>]))
fn into_any(self: Box<Resource<T>>) -> Box<dyn Any>
fn set( &mut self, value: Box<dyn Reflect>, ) -> Result<Box<dyn Reflect>, Box<dyn Reflect>>
fn as_any(&self, func: &mut dyn FnMut(&(dyn Any + 'static)))
fn as_any_mut(&mut self, func: &mut dyn FnMut(&mut (dyn Any + 'static)))
fn as_reflect(&self, func: &mut dyn FnMut(&(dyn Reflect + 'static)))
fn as_reflect_mut(&mut self, func: &mut dyn FnMut(&mut (dyn Reflect + 'static)))
Source§fn set_field(
&mut self,
field_name: &str,
value: Box<dyn Reflect>,
func: &mut dyn FnMut(Result<Box<dyn Reflect>, SetFieldError>),
)
fn set_field( &mut self, field_name: &str, value: Box<dyn Reflect>, func: &mut dyn FnMut(Result<Box<dyn Reflect>, SetFieldError>), )
#[reflect(setter = ..)] or falls back to
Reflect::field_mutfn field( &self, name: &str, func: &mut dyn FnMut(Option<&(dyn Reflect + 'static)>), )
fn field_mut( &mut self, name: &str, func: &mut dyn FnMut(Option<&mut (dyn Reflect + 'static)>), )
fn as_array(&self, func: &mut dyn FnMut(Option<&(dyn ReflectArray + 'static)>))
fn as_array_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectArray + 'static)>), )
fn as_list(&self, func: &mut dyn FnMut(Option<&(dyn ReflectList + 'static)>))
fn as_list_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectList + 'static)>), )
fn as_inheritable_variable( &self, func: &mut dyn FnMut(Option<&(dyn ReflectInheritableVariable + 'static)>), )
fn as_inheritable_variable_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectInheritableVariable + 'static)>), )
fn as_hash_map( &self, func: &mut dyn FnMut(Option<&(dyn ReflectHashMap + 'static)>), )
fn as_hash_map_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectHashMap + 'static)>), )
fn as_handle( &self, func: &mut dyn FnMut(Option<&(dyn ReflectHandle + 'static)>), )
fn as_handle_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectHandle + 'static)>), )
Source§impl<T> Serialize for Resource<T>where
T: Debug + TypedResourceData,
impl<T> Serialize for Resource<T>where
T: Debug + TypedResourceData,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl ShaderResourceExtension for Resource<Shader>
impl ShaderResourceExtension for Resource<Shader>
Source§fn from_str(
id: Uuid,
str: &str,
kind: ResourceKind,
) -> Result<Resource<Shader>, ShaderError>
fn from_str( id: Uuid, str: &str, kind: ResourceKind, ) -> Result<Resource<Shader>, ShaderError>
ShaderResource.Source§fn standard_particle_system() -> Resource<Shader> ⓘ
fn standard_particle_system() -> Resource<Shader> ⓘ
Source§fn standard_twosides() -> Resource<Shader> ⓘ
fn standard_twosides() -> Resource<Shader> ⓘ
Source§fn standard_shaders() -> [&'static BuiltInResource<Shader>; 8]
fn standard_shaders() -> [&'static BuiltInResource<Shader>; 8]
Source§impl SoundBufferResourceExtension for Resource<SoundBuffer>
impl SoundBufferResourceExtension for Resource<SoundBuffer>
Source§fn new_streaming(
data_source: DataSource,
) -> Result<Resource<SoundBuffer>, SoundBufferResourceLoadError>
fn new_streaming( data_source: DataSource, ) -> Result<Resource<SoundBuffer>, SoundBufferResourceLoadError>
Source§fn new_generic(
data_source: DataSource,
) -> Result<Resource<SoundBuffer>, SoundBufferResourceLoadError>
fn new_generic( data_source: DataSource, ) -> Result<Resource<SoundBuffer>, SoundBufferResourceLoadError>
Source§impl StyleResourceExt for Resource<Style>
impl StyleResourceExt for Resource<Style>
Source§fn set(
&self,
name: impl Into<ImmutableString>,
property: impl Into<StyleProperty>,
)
fn set( &self, name: impl Into<ImmutableString>, property: impl Into<StyleProperty>, )
Style::set.Source§fn get<P>(&self, name: impl Into<ImmutableString>) -> Option<P>where
StyleProperty: IntoPrimitive<P>,
fn get<P>(&self, name: impl Into<ImmutableString>) -> Option<P>where
StyleProperty: IntoPrimitive<P>,
Style::get.Source§fn get_or<P>(&self, name: impl Into<ImmutableString>, default: P) -> Pwhere
StyleProperty: IntoPrimitive<P>,
fn get_or<P>(&self, name: impl Into<ImmutableString>, default: P) -> Pwhere
StyleProperty: IntoPrimitive<P>,
Style::get_or.Source§fn get_or_default<P>(&self, name: impl Into<ImmutableString>) -> P
fn get_or_default<P>(&self, name: impl Into<ImmutableString>) -> P
Style::get_or_default.Source§fn property<P>(&self, name: impl Into<ImmutableString>) -> StyledProperty<P>
fn property<P>(&self, name: impl Into<ImmutableString>) -> StyledProperty<P>
Style::property.Source§impl TextureResourceExtension for Resource<Texture>
impl TextureResourceExtension for Resource<Texture>
Source§fn new_render_target(width: u32, height: u32) -> Resource<Texture> ⓘ
fn new_render_target(width: u32, height: u32) -> Resource<Texture> ⓘ
Source§fn new_cube_render_target(size: u32) -> Resource<Texture> ⓘ
fn new_cube_render_target(size: u32) -> Resource<Texture> ⓘ
Source§fn new_render_target_with_format(
width: u32,
height: u32,
pixel_kind: TexturePixelKind,
) -> Resource<Texture> ⓘ
fn new_render_target_with_format( width: u32, height: u32, pixel_kind: TexturePixelKind, ) -> Resource<Texture> ⓘ
Source§fn load_from_memory(
resource_uuid: Uuid,
kind: ResourceKind,
data: &[u8],
import_options: TextureImportOptions,
) -> Result<Resource<Texture>, TextureError>
fn load_from_memory( resource_uuid: Uuid, kind: ResourceKind, data: &[u8], import_options: TextureImportOptions, ) -> Result<Resource<Texture>, TextureError>
Source§fn from_bytes(
resource_uuid: Uuid,
kind: TextureKind,
pixel_kind: TexturePixelKind,
bytes: Vec<u8>,
resource_kind: ResourceKind,
) -> Option<Resource<Texture>>
fn from_bytes( resource_uuid: Uuid, kind: TextureKind, pixel_kind: TexturePixelKind, bytes: Vec<u8>, resource_kind: ResourceKind, ) -> Option<Resource<Texture>>
Source§fn deep_clone(&self) -> Resource<Texture> ⓘ
fn deep_clone(&self) -> Resource<Texture> ⓘ
TextureResource::clone, this method clones the actual texture data,
which could be slow.Source§impl<T> TypeUuidProvider for Resource<T>where
T: TypedResourceData,
impl<T> TypeUuidProvider for Resource<T>where
T: TypedResourceData,
Source§impl UserInterfaceResourceExtension for Resource<UserInterface>
impl UserInterfaceResourceExtension for Resource<UserInterface>
fn instantiate( &self, ui: &mut UserInterface, ) -> (Handle<UiNode>, NodeHandleMap<UiNode>)
Source§impl<T> Visit for Resource<T>where
T: TypedResourceData,
impl<T> Visit for Resource<T>where
T: TypedResourceData,
Source§fn visit(&mut self, name: &str, visitor: &mut Visitor) -> Result<(), VisitError>
fn visit(&mut self, name: &str, visitor: &mut Visitor) -> Result<(), VisitError>
impl<T> Eq for Resource<T>where
T: TypedResourceData,
Auto Trait Implementations§
impl<T> Freeze for Resource<T>
impl<T> !RefUnwindSafe for Resource<T>
impl<T> Send for Resource<T>where
T: Send,
impl<T> Sync for Resource<T>where
T: Sync,
impl<T> Unpin for Resource<T>where
T: Unpin,
impl<T> !UnwindSafe for Resource<T>
Blanket Implementations§
Source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult for T
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,
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>. Box<dyn Any> can
then be further downcast into Box<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>. Rc<Any> 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> 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> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FieldValue for Twhere
T: Reflect,
impl<T> FieldValue for Twhere
T: Reflect,
Source§fn field_value_as_any_ref(&self) -> &(dyn Any + 'static)
fn field_value_as_any_ref(&self) -> &(dyn Any + 'static)
self to a &dyn AnySource§fn field_value_as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn field_value_as_any_mut(&mut self) -> &mut (dyn Any + 'static)
self to a &mut dyn Anyfn field_value_as_reflect(&self) -> &(dyn Reflect + 'static)
fn field_value_as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
fn type_name(&self) -> &'static str
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn map<U, F>(self, f: F) -> Map<Self, F> ⓘ
fn map<U, F>(self, f: F) -> Map<Self, F> ⓘ
Source§fn map_into<U>(self) -> MapInto<Self, U> ⓘ
fn map_into<U>(self) -> MapInto<Self, U> ⓘ
Source§fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F> ⓘ
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F> ⓘ
f. Read moreSource§fn left_future<B>(self) -> Either<Self, B> ⓘ
fn left_future<B>(self) -> Either<Self, B> ⓘ
Source§fn right_future<A>(self) -> Either<A, Self> ⓘ
fn right_future<A>(self) -> Either<A, Self> ⓘ
Source§fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
Source§fn flatten(self) -> Flatten<Self> ⓘ
fn flatten(self) -> Flatten<Self> ⓘ
Source§fn flatten_stream(self) -> FlattenStream<Self>
fn flatten_stream(self) -> FlattenStream<Self>
Source§fn fuse(self) -> Fuse<Self> ⓘwhere
Self: Sized,
fn fuse(self) -> Fuse<Self> ⓘwhere
Self: Sized,
poll will never again be called once it has
completed. This method can be used to turn any Future into a
FusedFuture. Read moreSource§fn inspect<F>(self, f: F) -> Inspect<Self, F> ⓘ
fn inspect<F>(self, f: F) -> Inspect<Self, F> ⓘ
Source§fn catch_unwind(self) -> CatchUnwind<Self> ⓘwhere
Self: Sized + UnwindSafe,
fn catch_unwind(self) -> CatchUnwind<Self> ⓘwhere
Self: Sized + UnwindSafe,
Source§fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)where
Self: Sized,
fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)where
Self: Sized,
() on completion and sends
its output to another future on a separate task. Read moreSource§fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
Source§fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>where
Self: Sized + 'a,
fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>where
Self: Sized + 'a,
Source§fn unit_error(self) -> UnitError<Self> ⓘwhere
Self: Sized,
fn unit_error(self) -> UnitError<Self> ⓘwhere
Self: Sized,
Future<Output = T> into a
TryFuture<Ok = T, Error = ()>.Source§fn never_error(self) -> NeverError<Self> ⓘwhere
Self: Sized,
fn never_error(self) -> NeverError<Self> ⓘwhere
Self: Sized,
Future<Output = T> into a
TryFuture<Ok = T, Error = Never>.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> 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> ⓘ
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> ⓘ
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 moreSource§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Source§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().Source§impl<T> ReflectBase for Twhere
T: Reflect,
impl<T> ReflectBase for Twhere
T: Reflect,
fn as_any_raw(&self) -> &(dyn Any + 'static)
fn as_any_raw_mut(&mut self) -> &mut (dyn Any + 'static)
Source§impl<T> ResolvePath for Twhere
T: Reflect,
impl<T> ResolvePath for Twhere
T: Reflect,
fn resolve_path<'p>( &self, path: &'p str, func: &mut dyn FnMut(Result<&(dyn Reflect + 'static), ReflectPathError<'p>>), )
fn resolve_path_mut<'p>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut (dyn Reflect + 'static), ReflectPathError<'p>>), )
fn get_resolve_path<'p, T>(
&self,
path: &'p str,
func: &mut dyn FnMut(Result<&T, ReflectPathError<'p>>),
)where
T: Reflect,
fn get_resolve_path_mut<'p, T>(
&mut self,
path: &'p str,
func: &mut dyn FnMut(Result<&mut T, ReflectPathError<'p>>),
)where
T: Reflect,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.