#varlink #ipc #parser #rpc #protocols

varlink_parser

A crate for parsing varlink interface definition files

30 releases (17 stable)

4.2.0 Dec 7, 2021
4.1.0 Mar 9, 2021
4.0.4 Jun 3, 2020
4.0.3 Nov 14, 2019
0.3.0 Mar 24, 2018

#1192 in Parser implementations

Download history 43/week @ 2024-01-08 13/week @ 2024-01-15 13/week @ 2024-02-19 23/week @ 2024-02-26 61/week @ 2024-03-04

97 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;
use std::convert::TryFrom;
let interface = IDL::try_from("
## 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

~155–410KB