pub enum Value {
Null,
Bool(bool),
Int(i64),
Float(f64),
String(JsonString),
Array(Vec<JsonValue>),
Object(BTreeMap<JsonString, JsonValue>),
}
Variants§
Null
Bool(bool)
Int(i64)
Float(f64)
String(JsonString)
Array(Vec<JsonValue>)
Object(BTreeMap<JsonString, JsonValue>)
Trait Implementations§
source§impl<'__value, '__vm> Getable<'__vm, '__value> for Value
impl<'__value, '__vm> Getable<'__vm, '__value> for Value
type Proxy = Variants<'__value>
fn to_proxy( vm: &'__vm Thread, value: _GluonVariants<'__value> ) -> _GluonResult<Self::Proxy>
fn from_proxy(vm: &'__vm Thread, proxy: &'__value mut Self::Proxy) -> Self
fn from_value(vm: &'__vm Thread, variants: _GluonVariants<'__value>) -> Self
source§impl<'__vm> Pushable<'__vm> for Value
impl<'__vm> Pushable<'__vm> for Value
source§fn vm_push(self, ctx: &mut ActiveThread<'__vm>) -> _GluonResult<()>
fn vm_push(self, ctx: &mut ActiveThread<'__vm>) -> _GluonResult<()>
Pushes
self
to stack
. If the call is successful a single element should have been added
to the stack and Ok(())
should be returned. If the call is unsuccessful Status:Error
should be returned and the stack should be left intactfn status_push(self, context: &mut ActiveThread<'vm>) -> Statuswhere
Self: Sized,
unsafe fn marshal_unrooted(self, vm: &'vm Thread) -> Result<Value>where
Self: Sized,
fn marshal<T>(self, vm: &'vm Thread) -> Result<RootedValue<T>>
source§impl SerializeState<Thread> for Value
impl SerializeState<Thread> for Value
source§fn serialize_state<__S>(
&self,
__serializer: __S,
__seed: &Thread
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
fn serialize_state<__S>(
&self,
__serializer: __S,
__seed: &Thread
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
Serializes
self
source§impl VmType for Value
impl VmType for Value
fn make_forall_type(vm: &Thread) -> ArcType
source§const EXTRA_ARGS: VmIndex = 0u32
const EXTRA_ARGS: VmIndex = 0u32
How many extra arguments a function returning this type requires.
Used for abstract types which when used in return position should act like they still need
more arguments before they are called
Auto Trait Implementations§
impl !RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl !UnwindSafe for Value
Blanket Implementations§
source§impl<'vm, T> AsyncPushable<'vm> for Twhere
T: Pushable<'vm>,
impl<'vm, T> AsyncPushable<'vm> for Twhere
T: Pushable<'vm>,
source§fn async_push(
self,
context: &mut ActiveThread<'vm>,
lock: Lock,
_: u32
) -> Poll<Result<(), Error>>
fn async_push( self, context: &mut ActiveThread<'vm>, lock: Lock, _: u32 ) -> Poll<Result<(), Error>>
Pushes
self
to stack
. If the call is successful a single element should have been added
to the stack and Ok(())
should be returned. If the call is unsuccessful Status:Error
should be returned and the stack should be left intact. Read morefn async_status_push(
self,
context: &mut ActiveThread<'vm>,
lock: Lock,
frame_index: VmIndex
) -> Statuswhere
Self: Sized,
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
§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.