fn to_string(&self, mc: MutationContext<'gc, '_>) -> Result<Value<'gc>, Error> {
        let class_name = self
            .as_proto_class()
            .map(|c| c.read().name().local_name())
            .unwrap_or_else(|| "Object".into());

        Ok(AvmString::new(mc, format!("[object {}]", class_name)).into())
    }
/// Implement the result of calling `Object.prototype.toString` on this
/// object class.
///
/// `toString` is a method used to request an object be coerced to a string
/// value. The default implementation is stored here. User-specified string
/// coercions happen by defining `toString` in a downstream class or
/// prototype; this is then picked up by the VM runtime when doing
/// coercions.
Implement the result of calling `Object.prototype.toString` on this
object class.

`toString` is a method used to request an object be coerced to a string
value. The default implementation is stored here. User-specified string
coercions happen by defining `toString` in a downstream class or
prototype; this is then picked up by the VM runtime when doing
coercions.
Implement the result of calling ` Object . prototype . toString ` on this object class . ` toString ` is a method used to request an object be coerced to a string value . The default implementation is stored here . User - specified string coercions happen by defining ` toString ` in a downstream class or prototype ; this is then picked up by the VM runtime when doing coercions .
fn to_string(&self, mc: MutationContext<'gc, '_>) -> Result<Value<'gc>, Error> {
        let class_name = self
            .as_proto_class()
            .map(|c| c.read().name().local_name())
            .unwrap_or_else(|| "Object".into());
        Ok(AvmString::new(mc, format!("[object {}]", class_name)).into())
    }
fn to_string ( & self , mc : MutationContext < ' gc , ' _ > ) -> Result < Value < ' gc > , Error > { let class_name = self . as_proto_class ( ) . map ( | c | c . read ( ) . name ( ) . local_name ( ) ) . unwrap_or_else ( | | " " . into ( ) ) ; Ok ( AvmString :: new ( mc , format ! ( " " class_name ) ) . into ( ) ) }
Implement the result of calling `Object.prototype.toString` on this
object class.
Implement the result of calling ` Object . prototype . toString ` on this object class .
&self
mc
MutationContext<'gc, '_>
&self
mc
MutationContext<'gc, '_>