DSGJSON

Trait DSGJSON 

Source
pub trait DSGJSON<T: Serialize + for<'a> Deserialize<'a>, A: JSONObjType> {
    // Required methods
    fn new(
        dec_id: ObjectId,
        owner_id: ObjectId,
        obj_type: u16,
        obj: &T,
    ) -> BuckyResult<JSONObject<A>>;
    fn get(&self) -> BuckyResult<T>;
}

Required Methods§

Source

fn new( dec_id: ObjectId, owner_id: ObjectId, obj_type: u16, obj: &T, ) -> BuckyResult<JSONObject<A>>

Source

fn get(&self) -> BuckyResult<T>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: Serialize + for<'a> Deserialize<'a>, A: JSONObjType> DSGJSON<T, A> for NamedObjectBase<JSONObjectType<A>>

Source§

fn new( dec_id: ObjectId, owner_id: ObjectId, obj_type: u16, obj: &T, ) -> BuckyResult<JSONObject<A>>

Source§

fn get(&self) -> BuckyResult<T>

Implementors§