client-uploader-traits 0.1.0

Common traits for repository uploader clients such as zenodo-rs, internetarchive-rs, and figshare-rs.
Documentation
  • Coverage
  • 100%
    154 out of 154 items documented1 out of 92 items with examples
  • Size
  • Source code size: 57.2 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 6.39 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 54s Average build duration of successful builds.
  • all releases: 54s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • LucaCappelletti94/client-uploader-traits
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • LucaCappelletti94

client-uploader-traits

CI crates.io docs.rs License Rust

Traits defining a common generic traits surface for uploader clients such as zenodo-rs, internetarchive-rs, and figshare-rs.

It covers:

  • client configuration
  • upload, file, and resource inspection
  • public lookup, search, and download capabilities
  • create/update publication workflows
  • publication outcome and search-result inspection
  • small generic helpers and a prelude
use client_uploader_traits::{
    CreatePublication, CreatePublicationRequest, PublicationOutcome,
};

async fn publish<C>(
    client: &C,
    request: CreatePublicationRequest<C::CreateTarget, C::Metadata, C::Upload>,
) -> Result<C::Output, C::Error>
where
    C: CreatePublication,
    C::Output: PublicationOutcome,
{
    client.create_publication(request).await
}

This crate is intentionally self-contained. Real conformance tests against concrete client crates should live in those crates.