#parser #varlink #ipc #rpc #protocol

varlink_parser

A crate for parsing varlink interface definition files

26 releases (13 stable)

✓ Uses Rust 2018 edition

4.0.2 May 15, 2019
4.0.1 Jan 26, 2019
3.0.0 Jan 9, 2019
2.2.2 Dec 4, 2018
0.3.0 Mar 24, 2018

#45 in Parser tooling

Download history 3/week @ 2019-04-25 27/week @ 2019-05-02 35/week @ 2019-05-09 55/week @ 2019-05-16 61/week @ 2019-05-23 28/week @ 2019-05-30 53/week @ 2019-06-06 90/week @ 2019-06-13 103/week @ 2019-06-20 307/week @ 2019-06-27 163/week @ 2019-07-04 52/week @ 2019-07-11 9/week @ 2019-07-18 4/week @ 2019-07-25 32/week @ 2019-08-01

139 downloads per month
Used in 4 crates (2 directly)

MIT/Apache

166KB
3.5K SLoC

varlink_parser

varlink_parser is a rust crate for parsing varlink interface definition files.

Build Status Crate

More Info


lib.rs:

varlink_parser crate for parsing varlink interface definition files.

Examples

use varlink_parser::IDL;
let interface = IDL::from_string("
## The Varlink Service Interface is provided by every varlink service. It
## describes the service and the interfaces it implements.
interface org.varlink.service

## Get a list of all the interfaces a service provides and information
## about the implementation.
method GetInfo() -> (
vendor: string,
product: string,
version: string,
url: string,
interfaces: []string
)

## Get the description of an interface that is implemented by this service.
method GetInterfaceDescription(interface: string) -> (description: string)

## The requested interface was not found.
error InterfaceNotFound (interface: string)

## The requested method was not found
error MethodNotFound (method: string)

## The interface defines the requested method, but the service does not
## implement it.
error MethodNotImplemented (method: string)

## One of the passed parameters is invalid.
error InvalidParameter (parameter: string)
").unwrap();
   assert_eq!(interface.name, "org.varlink.service");

Dependencies

~586KB