pub struct Object<'a>(/* private fields */);Expand description
A reference to an AS3 object.
This type assumes that the underlying handle is always valid. The runtime is responsible for ensuring the correctness and lifetime of the handle.
The handle may still be as3::null, depending on the API behavior.
In such cases, as3::null is treated as a valid value at the ABI level,
but may represent the absence of an object.
Implementations§
Source§impl<'a> Object<'a>
impl<'a> Object<'a>
pub fn new(ctx: &CurrentContext<'a>) -> NonNullObject<'a>
pub fn non_null(self) -> Option<NonNullObject<'a>>
Trait Implementations§
Source§impl<'a> AsObject<'a> for Object<'a>
impl<'a> AsObject<'a> for Object<'a>
fn is_null(self) -> bool
fn as_object(self) -> Object<'a>
Source§unsafe fn as_unchecked<T: AsObject<'a>>(self) -> T
unsafe fn as_unchecked<T: AsObject<'a>>(self) -> T
Casts this object to
T without checks. Read moreSource§unsafe fn from_unchecked<O: AsObject<'a>>(object: O) -> Self
unsafe fn from_unchecked<O: AsObject<'a>>(object: O) -> Self
Casts an object to
Self without checks. Read morefn as_ptr(self) -> FREObject
fn get_property(self, name: UCStr) -> Result<Object<'a>, ExternalError<'a>>
fn set_property<O: AsObject<'a>>( self, name: UCStr, value: O, ) -> Result<(), ExternalError<'a>>
fn call_method( self, name: UCStr, args: Option<&[Object<'_>]>, ) -> Result<Object<'a>, ExternalError<'a>>
Source§impl<'a, O> From<O> for Object<'a>where
O: AsNonNullObject<'a>,
impl<'a, O> From<O> for Object<'a>where
O: AsNonNullObject<'a>,
Source§impl ToUcstrLossy for Object<'_>
impl ToUcstrLossy for Object<'_>
fn to_ucstr_lossy(&self) -> UCStr
Source§impl<'a> TryFrom<Object<'a>> for BitmapData<'a>
impl<'a> TryFrom<Object<'a>> for BitmapData<'a>
Source§impl<'a> TryFrom<Object<'a>> for NonNullObject<'a>
impl<'a> TryFrom<Object<'a>> for NonNullObject<'a>
impl<'a> Copy for Object<'a>
Auto Trait Implementations§
impl<'a> Freeze for Object<'a>
impl<'a> RefUnwindSafe for Object<'a>
impl<'a> !Send for Object<'a>
impl<'a> !Sync for Object<'a>
impl<'a> Unpin for Object<'a>
impl<'a> UnsafeUnpin for Object<'a>
impl<'a> UnwindSafe for Object<'a>
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