[−][src]Struct glsp_engine::Obj
The obj primitive type.
Note that CallableOps is implemented for Root<Class>, so an
Obj can be constructed from a Class using glsp::call.
Implementations
impl Obj[src]
pub fn kill(&self) -> GResult<()>[src]
Kills the object.
Equivalent to (obj-kill! ob).
pub fn is_killed(&self) -> bool[src]
Returns true if the object has been killed.
Equivalent to (obj-killed? ob).
pub fn freeze(&self)[src]
Makes the object immutable.
Equivalent to (freeze! ob).
pub fn is_frozen(&self) -> bool[src]
Returns true if the object has been frozen.
pub fn class(&self) -> Root<Class>[src]
Returns the object's class.
Equivalent to (class-of ob).
pub fn is(&self, class: &Root<Class>) -> bool[src]
Returns true if the object is an instance of the given class or mixin.
Equivalent to (is? ob cls).
pub fn has<S: ToSym>(&self, key: S) -> GResult<bool>[src]
Returns true if the given name is currently bound to a field, constant or property.
Equivalent to (has? ob key).
pub fn has_meth<S: ToSym>(&self, key: S) -> GResult<bool>[src]
Returns true if the given name is currently bound to a method.
Equivalent to (has-meth? ob key).
pub fn get<S: ToSym, V: FromVal>(&self, key: S) -> GResult<V>[src]
Accesses the value of a field, constant or property.
Equivalent to [ob key].
pub fn get_if_present<S: ToSym, V: FromVal>(&self, key: S) -> GResult<Option<V>>[src]
Accesses the value of a field, constant or property, if it exists.
Equivalent to [ob (? key)].
pub fn access_giter(obj: &Root<Obj>, giter: &Root<GIter>) -> Root<GIter>[src]
Creates an indexing iterator for this collection.
Equivalent to [ob iter].
pub fn call<S, A: ?Sized, R>(&self, key: S, args: &A) -> GResult<R> where
S: ToSym,
A: ToCallArgs,
R: FromVal, [src]
S: ToSym,
A: ToCallArgs,
R: FromVal,
Invokes a method.
Equivalent to (call-meth ob key ..args).
pub fn call_if_present<S, A: ?Sized, R>(
&self,
key: S,
args: &A
) -> GResult<Option<R>> where
S: ToSym,
A: ToCallArgs,
R: FromVal, [src]
&self,
key: S,
args: &A
) -> GResult<Option<R>> where
S: ToSym,
A: ToCallArgs,
R: FromVal,
Invokes a method, if it exists.
Equivalent to (call-meth ob (? key) ..args).
pub fn set<S: ToSym, V: ToVal>(&self, key: S, value: V) -> GResult<()>[src]
Mutates the field or property bound to the given name.
Equivalent to (= [ob key] value).
pub fn set_if_present<S: ToSym, V: ToVal>(
&self,
key: S,
value: V
) -> GResult<bool>[src]
&self,
key: S,
value: V
) -> GResult<bool>
Mutates the field or property bound to the given name, if any. Returns true if
the field or property exists.
Equivalent to (= [ob (? key)] value).
pub fn has_state<S: ToSym>(&self, state_name: S) -> GResult<bool>[src]
Returns true if the object's class defines a state with the given name, even if it's not
currently enabled.
Equivalent to (has-state? ob state-name).
pub fn is_enab<S: ToSym>(&self, state_name: S) -> GResult<bool>[src]
Returns true if a state is currently enabled.
Equivalent to (enab? ob state-name).
pub fn enab<S, A: ?Sized>(&self, state_name: S, args: &A) -> GResult<()> where
S: ToSym,
A: ToCallArgs, [src]
S: ToSym,
A: ToCallArgs,
Enables a state.
Equivalent to (enab! ob state-name).
pub fn disab<S: ToSym>(&self, state_name: S) -> GResult<()>[src]
Disables a state.
Equivalent to (disab! ob state-name).
pub fn try_eq(&self, other: &Root<Obj>) -> GResult<bool>[src]
Equivalent to (eq? self other).
Note that, because this may invoke an op-eq? method, it can potentially fail.
The same is true for PartialEq comparisons between objects using Rust's == operator.
In that case, if an error occurs, the operator will panic.
Trait Implementations
impl Debug for Obj[src]
impl Display for Obj[src]
impl<'a: 'r, 'r> MakeArg<'a> for &'r Obj[src]
impl PartialEq<Root<Obj>> for Obj[src]
Auto Trait Implementations
impl !GSend for Obj
impl GStore for Obj
impl !RefUnwindSafe for Obj
impl !Send for Obj
impl !Sync for Obj
impl Unpin for Obj
impl !UnwindSafe for Obj
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Erased for T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,