Crate chrome_native_messaging [] [src]

Modules

errors

Error handling is assisted by the error_chain crate

Macros

send

Writes the given JSON data to stdout, thereby 'sending' a message back to Chrome. If you are on stable, then you also need to import macros from the serde_json crate.

Functions

event_loop

Starts an 'event loop' which waits for input from Chrome, and then calls the callback with the message. Despite its name, nothing about this function is asynchronous so if you want really efficient performance while running async tasks, you should probably write your own loop.

read_input

Reads input from a stream, decoded according to Chrome's own documentation on native messaging. (https://developer.chrome.com/extensions/nativeMessaging)

write_output

Writes an output from a stream, encoded according to Chrome's documentation on native messaging. (https://developer.chrome.com/extensions/nativeMessaging)