[][src]Crate wsdclient

Crate for working with https://www.websequencediagrams.com/ public RESTful API This service allows to create sequence diagrams from simple text. Note: this library is a simple wrapper around the API. Some features of this service require premium subscription (like export to pdf format) Features supported by this library

  • statically typed library. Different options are represented as enums
  • multiple output formats: png, pdf (premium), svg (premium)
  • detection of actual output format. E.g. trying to get pdf with wrong API key leads to png output
  • allows specification of scale, paper size, paper orientation, style
  • parse returned errors

This crate contains command line tool for accessing websequencediagram API

$ wsdclient my_diag.wsd -o my.png


use wsdclient::{get_diagram};

use std::fs::File;
use std::io::Write;

fn main(){
   let spec = "A->B: text1";
   let rez = get_diagram(spec, &Default::default()).unwrap();


pub use types::Format;
pub use types::Style;
pub use types::PaperSize;
pub use types::PaperOrientation;
pub use types::PlotParameters;
pub use types::WSDEnum;
pub use types::DiagramError;
pub use client::get_diagram;
pub use client::WSDResult;



Contains actual client


Contains command line parsing


Contains types representing plot parameters(like format, page size, ...)