Trait serde_v8::Serializable[][src]

pub trait Serializable {
    fn to_v8<'a>(
        &self,
        scope: &mut HandleScope<'a>
    ) -> Result<Local<'a, Value>, Error>; }

Serializable exists to allow boxing values as “objects” to be serialized later, this is particularly useful for async op-responses. This trait is a more efficient replacement for erased-serde that makes less allocations, since it’s specific to serde_v8 (and thus doesn’t have to have generic outputs, etc…)

Required methods

fn to_v8<'a>(
    &self,
    scope: &mut HandleScope<'a>
) -> Result<Local<'a, Value>, Error>
[src]

Loading content...

Implementors

impl<T: Serialize> Serializable for T[src]

Allows all implementors of serde::Serialize to implement Serializable

Loading content...