#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

#40 in Parser tooling

Download history 39/week @ 2019-01-30 6/week @ 2019-02-06 13/week @ 2019-02-13 12/week @ 2019-02-20 63/week @ 2019-02-27 14/week @ 2019-03-06 18/week @ 2019-03-13 100/week @ 2019-03-20 27/week @ 2019-03-27 27/week @ 2019-04-03 5/week @ 2019-04-10 5/week @ 2019-04-17 28/week @ 2019-04-24 27/week @ 2019-05-01 2/week @ 2019-05-08

115 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

~572KB