Crate varlink_parser[][src]

varlink_parser crate for parsing varlink interface definition files.

Examples

use varlink_parser::Varlink;
let v = Varlink::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!(v.interface.name, "org.varlink.service");

Structs

Argument
Error
Interface
Method
Typedef
VEnum
VError
VStruct
Varlink

Enums

ErrorKind
VStructOrEnum
VType
VTypeExt

Type Definitions

Result