[][src]Trait flutter_engine::codec::MethodCodec

pub trait MethodCodec {
    type R;
    fn decode_method_call(buf: &[u8]) -> Option<MethodCall<Self::R>>;
fn encode_success_envelope(v: &Self::R) -> Vec<u8>;
fn encode_error_envelope(
        code: &str,
        message: &str,
        details: &Self::R
    ) -> Vec<u8>;
fn encode_method_call(v: &MethodCall<Self::R>) -> Vec<u8>;
fn decode_envelope(buf: &[u8]) -> Option<MethodCallResult<Self::R>>; }

Associated Types

type R

Loading content...

Required methods

fn decode_method_call(buf: &[u8]) -> Option<MethodCall<Self::R>>

Methods for handling dart call

fn encode_success_envelope(v: &Self::R) -> Vec<u8>

fn encode_error_envelope(
    code: &str,
    message: &str,
    details: &Self::R
) -> Vec<u8>

fn encode_method_call(v: &MethodCall<Self::R>) -> Vec<u8>

Methods for calling into dart

fn decode_envelope(buf: &[u8]) -> Option<MethodCallResult<Self::R>>

Loading content...

Implementors

impl MethodCodec for JsonMethodCodec[src]

type R = Value

impl MethodCodec for StandardMethodCodec[src]

type R = Value

Loading content...