[][src]Struct flutter_engine::channel::StandardMethodChannel

pub struct StandardMethodChannel { /* fields omitted */ }

Methods

impl StandardMethodChannel[src]

pub fn new(name: &str) -> Self[src]

Trait Implementations

impl Channel for StandardMethodChannel[src]

type Codec = StandardMethodCodec

type R = Value

fn invoke_method(&self, method_call: MethodCall<Self::R>)[src]

Invoke a flutter method using this channel

fn decode_method_call(&self, msg: &PlatformMessage) -> MethodCall<Self::R>[src]

Decode dart method call

fn send_success_event(&self, data: &Self::R)[src]

When flutter listen to a stream of events using EventChannel. This method send back a success event. It can be call multiple times to simulate stream. Read more

fn send_error_event(&self, code: &str, message: &str, data: &Self::R)[src]

When flutter listen to a stream of events using EventChannel. This method send back a error event. It can be call multiple times to simulate stream. Read more

fn send_method_call_response(
    &self,
    response_handle: Option<&FlutterPlatformMessageResponseHandle>,
    ret: MethodCallResult<Self::R>
) -> bool
[src]

Send a method call response

fn send_response(
    &self,
    response_handle: &FlutterPlatformMessageResponseHandle,
    buf: &[u8]
)
[src]

When flutter call a method using MethodChannel, it can wait for rust response using await syntax. This method send a response to flutter. This is a low level method. Please use send_method_call_response if that will work. Read more

fn send_platform_message(&self, msg: &PlatformMessage)[src]

Send a platform message over this channel. This is a low level method.

impl Sync for StandardMethodChannel[src]

impl Send for StandardMethodChannel[src]

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Erased for T