28 releases (15 stable)

4.0.4 Jun 3, 2020
4.0.3 Nov 14, 2019
4.0.2 May 15, 2019
4.0.1 Jan 26, 2019
0.3.0 Mar 24, 2018

#4 in #ipc

Download history 106/week @ 2020-06-30 50/week @ 2020-07-07 100/week @ 2020-07-14 44/week @ 2020-07-21 181/week @ 2020-07-28 79/week @ 2020-08-04 106/week @ 2020-08-11 45/week @ 2020-08-18 65/week @ 2020-08-25 105/week @ 2020-09-01 44/week @ 2020-09-08 21/week @ 2020-09-15 25/week @ 2020-09-22 76/week @ 2020-09-29 68/week @ 2020-10-06 20/week @ 2020-10-13

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

MIT/Apache

51KB
1.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

~190–305KB