pub struct Object(_, _);
Expand description
The base class in the object hierarchy.
Implementations
Trait Implementations
sourceimpl Ord for Object
impl Ord for Object
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<T: IsA<Object>> PartialOrd<T> for Object
impl<T: IsA<Object>> PartialOrd<T> for Object
sourcefn partial_cmp(&self, other: &T) -> Option<Ordering>
fn partial_cmp(&self, other: &T) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl StaticType for Object
impl StaticType for Object
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.impl Eq for Object
impl IsA<Object> for Binding
Auto Trait Implementations
impl RefUnwindSafe for Object
impl !Send for Object
impl !Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Cast for Twhere
T: IsA<Object>,
impl<T> Cast for Twhere
T: IsA<Object>,
sourcefn upcast<T>(self) -> Twhere
T: StaticType + UnsafeFrom<ObjectRef> + Wrapper,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: StaticType + UnsafeFrom<ObjectRef> + Wrapper,
Self: IsA<T>,
Upcasts an object to a superclass or interface
T
. Read moresourcefn upcast_ref<T>(&self) -> &Twhere
T: StaticType + UnsafeFrom<ObjectRef> + Wrapper,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: StaticType + UnsafeFrom<ObjectRef> + Wrapper,
Self: IsA<T>,
Upcasts an object to a reference of its superclass or interface
T
. Read moresourcefn downcast<T>(self) -> Result<T, Self>where
Self: Sized + Downcast<T>,
fn downcast<T>(self) -> Result<T, Self>where
Self: Sized + Downcast<T>,
Tries to downcast to a subclass or interface implementor
T
. Read moresourcefn downcast_ref<T>(&self) -> Option<&T>where
Self: Sized + Downcast<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
Self: Sized + Downcast<T>,
Tries to downcast to a reference of its subclass or interface implementor
T
. Read moresourcefn is<T>(&self) -> boolwhere
T: StaticType,
fn is<T>(&self) -> boolwhere
T: StaticType,
Returns
true
if the object is an instance of (can be cast to) T
.sourcefn dynamic_cast<T>(self) -> Result<T, Self>where
T: StaticType + UnsafeFrom<ObjectRef> + Wrapper,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: StaticType + UnsafeFrom<ObjectRef> + Wrapper,
Tries to cast to an object of type
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read moresourcefn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: StaticType + UnsafeFrom<ObjectRef> + Wrapper,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: StaticType + UnsafeFrom<ObjectRef> + Wrapper,
Tries to cast to reference to an object of type
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read moresourceimpl<Super, Sub> Downcast<Sub> for Superwhere
Super: IsA<Super>,
Sub: IsA<Super>,
impl<Super, Sub> Downcast<Sub> for Superwhere
Super: IsA<Super>,
Sub: IsA<Super>,
sourcefn can_downcast(&self) -> bool
fn can_downcast(&self) -> bool
Checks if it’s possible to downcast to
T
. Read moresourcefn downcast_ref(&self) -> Option<&Sub>
fn downcast_ref(&self) -> Option<&Sub>
Tries to downcast to
&T
. Read moresourceunsafe fn downcast_unchecked(self) -> Sub
unsafe fn downcast_unchecked(self) -> Sub
Downcasts to
T
unconditionally. Read moresourceunsafe fn downcast_ref_unchecked(&self) -> &Sub
unsafe fn downcast_ref_unchecked(&self) -> &Sub
Downcasts to
&T
unconditionally. Read more