pub struct PyColorMaterial { /* private fields */ }Implementations§
Source§impl PyColorMaterial
impl PyColorMaterial
Sourcepub fn from_owned(asset: ColorMaterial) -> (Self, PyAsset)
pub fn from_owned(asset: ColorMaterial) -> (Self, PyAsset)
Create from an owned asset value. Returns tuple for PyO3 class inheritance.
Sourcepub fn from_borrowed(storage: AssetStorage<ColorMaterial>) -> (Self, PyAsset)
pub fn from_borrowed(storage: AssetStorage<ColorMaterial>) -> (Self, PyAsset)
Create from a borrowed asset storage (for asset iteration).
pub fn as_ref(&self) -> PyResult<&ColorMaterial>
pub fn as_mut(&mut self) -> PyResult<&mut ColorMaterial>
Source§impl PyColorMaterial
impl PyColorMaterial
pub fn new( color: PyColor, texture: Option<&Bound<'_, PyAny>>, alpha_mode: PyAlphaMode2d, ) -> PyResult<(Self, PyAsset)>
pub fn color(&self, py: Python<'_>) -> PyResult<Py<PyColor>>
pub fn set_color(&mut self, color: PyColor) -> PyResult<()>
pub fn texture(&self) -> PyResult<Option<PyHandle>>
pub fn set_texture( &mut self, texture: Option<&Bound<'_, PyAny>>, ) -> PyResult<()>
pub fn alpha_mode(&self, py: Python<'_>) -> PyResult<Py<PyAlphaMode2d>>
pub fn set_alpha_mode(&mut self, alpha_mode: PyAlphaMode2d) -> PyResult<()>
pub fn __repr__(&self) -> PyResult<String>
Trait Implementations§
Source§impl Clone for PyColorMaterial
impl Clone for PyColorMaterial
Source§impl Debug for PyColorMaterial
impl Debug for PyColorMaterial
Source§impl From<ColorMaterial> for PyColorMaterial
impl From<ColorMaterial> for PyColorMaterial
Source§fn from(asset: ColorMaterial) -> Self
fn from(asset: ColorMaterial) -> Self
Converts to this type from the input type.
Source§impl NativeAsset for PyColorMaterial
impl NativeAsset for PyColorMaterial
Source§impl PyClass for PyColorMaterial
impl PyClass for PyColorMaterial
Source§impl PyClassImpl for PyColorMaterial
impl PyClassImpl for PyColorMaterial
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[pyclass(subclass)]
Source§const IS_SUBCLASS: bool = true
const IS_SUBCLASS: bool = true
#[pyclass(extends=…)]
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
#[pyclass(immutable_type)]
Source§const RAW_DOC: &'static CStr = c"\x00"
const RAW_DOC: &'static CStr = c"\x00"
Docstring for the class provided on the struct or enum. Read more
Source§const DOC: &'static CStr
const DOC: &'static CStr
Fully rendered class doc, including the
text_signature if a constructor is defined. Read moreSource§type ThreadChecker = SendablePyClass<PyColorMaterial>
type ThreadChecker = SendablePyClass<PyColorMaterial>
This handles following two situations: Read more
type Inventory = Pyo3MethodsInventoryForPyColorMaterial
Source§type PyClassMutability = <<PyAsset as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAsset as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable
Source§type BaseNativeType = <<PyColorMaterial as PyClassImpl>::BaseType as PyClassBaseType>::BaseNativeType
type BaseNativeType = <<PyColorMaterial as PyClassImpl>::BaseType as PyClassBaseType>::BaseNativeType
The closest native ancestor. This is
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature for PyColorMaterial
impl PyClassNewTextSignature for PyColorMaterial
const TEXT_SIGNATURE: &'static str = "(color=..., texture=None, alpha_mode=...)"
Source§impl PyTypeInfo for PyColorMaterial
impl PyTypeInfo for PyColorMaterial
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
Source§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
Returns the safe abstraction over the type object.
Source§impl TryFrom<PyColorMaterial> for ColorMaterial
impl TryFrom<PyColorMaterial> for ColorMaterial
impl DerefToPyAny for PyColorMaterial
impl ExtractPyClassWithClone for PyColorMaterial
Auto Trait Implementations§
impl Freeze for PyColorMaterial
impl !RefUnwindSafe for PyColorMaterial
impl Send for PyColorMaterial
impl Sync for PyColorMaterial
impl Unpin for PyColorMaterial
impl UnsafeUnpin for PyColorMaterial
impl !UnwindSafe for PyColorMaterial
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
Return the
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.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> 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>
Converts
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>
Converts
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)
Converts
&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)
Converts
&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<'a, 'py, T> FromPyObject<'a, 'py> for T
impl<'a, 'py, T> FromPyObject<'a, 'py> for T
Source§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> 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 moreSource§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>
Converts this type into the system output type.
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
Source§const NAME: &'static str = T::NAME
const NAME: &'static str = T::NAME
👎Deprecated since 0.27.0:
Use ::classinfo_object() instead and format the type name at runtime. Note that using built-in cast features is often better than manual PyTypeCheck usage.
Name of self. This is used in error messages, for example.
Source§impl<T> TypeData for T
impl<T> TypeData for T
Source§fn clone_type_data(&self) -> Box<dyn TypeData>
fn clone_type_data(&self) -> Box<dyn TypeData>
Creates a type-erased clone of this value.