Rust data structures and client for the PubChem REST API

Overview

pubchem.rs Star me

Rust data structures and client for the PubChem REST API.

Actions Codecov License Source Crate Documentation Changelog GitHub issues

πŸ”Œ Usage

πŸ’Š Compound

Create a Compound to query the PubChem API for a single compound. It can be constructed from a compound ID, from a compound name, from an InChI or InChIKey, or from a SMILES string:

extern crate pubchem;

let alanine = pubchem::Compound::new(5950);
let aspirin = pubchem::Compound::with_name("aspirin");
let acetone = pubchem::Compound::with_inchi("InChI=1S/C3H6O/c1-3(2)4/h1-2H3");
let lysine  = pubchem::Compound::with_inchikey("KDXKERNSBIXSRK-YFKPBYRVSA-N");
let benzene = pubchem::Compound::with_smiles("C1=CC=CC=C1");

Use the methods to query the REST API with ureq. Dedicated methods exist for common single properties:

let alanine = pubchem::Compound::new(5950);

alanine.title().unwrap(); // "Alanine"
alanine.molecular_formula().unwrap(); // "C3H7NO2"
alanine.canonical_smiles().unwrap(); // "CC(C(=O)O)N"
alanine.isomeric_smiles().unwrap();  // "C[C@@H](C(=O)O)N"

Each method will perform a single query to the PubChem API, which is inefficient if you wish to retrieve several properties at once. In that case, use the properties method and select which properties you want to retrieve in a single query:

use pubchem::CompoundProperty::*;

let properties = pubchem::Compound::new(5950)
    .properties(&[Title, MolecularFormula, CanonicalSMILES])
    .unwrap();

properties.molecular_formula; // Some("C3H7NO2")
properties.canonical_smiles; // Some("CC(C(=O)O)N")
properties.isomeric_smiles; // Some("C[C@@H](C(=O)O)N")

To retrieve metadata from multiple compounds at once, use the Compounds struct and use the properties method to pack everything into a single query:

use pubchem::CompoundProperty::*;

// retrieve metadata from the three aromatic L-amino acids at once
for prop in pubchem::Compounds::new([6140, 145742, 6305])
    .properties(&[Title, IUPACName, ExactMass])
    .unwrap()
{
    println!(
        "[{cid}] {title} {iupac} {mass}g/mol",
        cid = prop.cid,
        title = prop.title.unwrap(),
        iupac = prop.iupac_name.unwrap(),
        mass = prop.exact_mass.unwrap(),
    );
}

πŸ’­ Feedback

⚠️ Issue Tracker

Found a bug ? Have an enhancement request ? Head over to the GitHub issue tracker if you need to report or ask something. If you are filing in on a bug, please include as much information as you can about the issue, and try to recreate the same bug in a simple, easily reproducible situation.

πŸ“‹ Changelog

This project adheres to Semantic Versioning and provides a changelog in the Keep a Changelog format.

πŸ” See Also

If you're a bioinformatician and a Rustacean, you may be interested in these other libraries:

  • uniprot.rs: Rust data structures for the UniProtKB databases.
  • obofoundry.rs: Rust data structures for the OBO Foundry.
  • fastobo: Rust parser and abstract syntax tree for Open Biomedical Ontologies.

πŸ“œ License

This library is provided under the open-source MIT license.

This project is in no way not affiliated, sponsored, or otherwise endorsed by the PubChem developers. It was developed by Martin Larralde during his PhD project at the European Molecular Biology Laboratory in the Zeller team.

Comments
  • Update quick-xml requirement from 0.22.0 to 0.27.0

    Update quick-xml requirement from 0.22.0 to 0.27.0

    Updates the requirements on quick-xml to permit the latest version.

    Release notes

    Sourced from quick-xml's releases.

    Improvements in serde deserializer and MSRV bumped to 1.52

    What's Changed

    MSRV was increased from 1.46 to 1.52 in #521.

    New Features

    • #521: Implement Clone for all error types. This required changing Error::Io to contain Arc<std::io::Error> instead of std::io::Error since std::io::Error does not implement Clone.

    Bug Fixes

    • #490: Ensure that serialization of map keys always produces valid XML names. In particular, that means that maps with numeric and numeric-like keys (for example, "42") no longer can be serialized because [XML name] cannot start from a digit
    • #500: Fix deserialization of top-level sequences of enums, like
      <?xml version="1.0" encoding="UTF-8"?>
      <!-- list of enum Enum { A, B, Π‘ } -->
      <A/>
      <B/>
      <C/>
      
    • #514: Fix wrong reporting Error::EndEventMismatch after disabling and enabling .check_end_names
    • #517: Fix swapped codes for \r and \n characters when escaping them
    • #523: Fix incorrect skipping text and CDATA content before any map-like structures in serde deserializer, like
      unwanted text<struct>...</struct>
      
    • #523: Fix incorrect handling of xs:lists with encoded spaces: they still act as delimiters, which is confirmed also by mature XmlBeans Java library
    • #473: Fix a hidden requirement to enable serde's derive feature to get quick-xml's serialize feature for edition = 2021 or resolver = 2 crates

    Misc Changes

    • #490: Removed $unflatten= special prefix for fields for serde (de)serializer, because:

      • it is useless for deserializer
      • serializer was rewritten and does not require it anymore

      This prefix allowed you to serialize struct field as an XML element and now replaced by a more thoughtful system explicitly indicating that a field should be serialized as an attribute by prepending @ character to its name

    • #490: Removed $primitive= prefix. That prefix allowed you to serialize struct field as an attribute instead of an element and now replaced by a more thoughtful system explicitly indicating that a field should be serialized as an attribute

    ... (truncated)

    Changelog

    Sourced from quick-xml's changelog.

    0.27.0 -- 2022-12-25

    New Features

    • #521: Implement Clone for all error types. This required changing Error::Io to contain Arc<std::io::Error> instead of std::io::Error since std::io::Error does not implement Clone.

    Bug Fixes

    • #490: Ensure that serialization of map keys always produces valid XML names. In particular, that means that maps with numeric and numeric-like keys (for example, "42") no longer can be serialized because [XML name] cannot start from a digit
    • #500: Fix deserialization of top-level sequences of enums, like
      <?xml version="1.0" encoding="UTF-8"?>
      <!-- list of enum Enum { A, B, Π‘ } -->
      <A/>
      <B/>
      <C/>
      
    • #514: Fix wrong reporting Error::EndEventMismatch after disabling and enabling .check_end_names
    • #517: Fix swapped codes for \r and \n characters when escaping them
    • #523: Fix incorrect skipping text and CDATA content before any map-like structures in serde deserializer, like
      unwanted text<struct>...</struct>
      
    • #523: Fix incorrect handling of xs:lists with encoded spaces: they still act as delimiters, which is confirmed also by mature XmlBeans Java library
    • #473: Fix a hidden requirement to enable serde's derive feature to get quick-xml's serialize feature for edition = 2021 or resolver = 2 crates

    Misc Changes

    • #490: Removed $unflatten= special prefix for fields for serde (de)serializer, because:

      • it is useless for deserializer
      • serializer was rewritten and does not require it anymore

      This prefix allowed you to serialize struct field as an XML element and now replaced by a more thoughtful system explicitly indicating that a field should be serialized as an attribute by prepending @ character to its name

    • #490: Removed $primitive= prefix. That prefix allowed you to serialize struct field as an attribute instead of an element and now replaced by a more thoughtful system explicitly indicating that a field should be serialized as an attribute by prepending @ character to its name

    • #490: In addition to the $value special name for a field a new $text special name was added:

    ... (truncated)

    Commits
    • f63910d Release 0.27.0
    • d1908e6 Merge pull request #528 from Mingun/doc
    • 66275cc Add an example for deserializing wrapped lists
    • c521a2f Add documentation for mapping from XML to Rust used by deserializer
    • 44a4c69 Merge pull request #524 from Mingun/serde
    • c205f1d Fix #473: add explicit serde feature that is independent from dependency
    • e877f4f Merge pull request #523 from Mingun/fix-bugs
    • 8283121 Add some comments about deserializing sequences and give a more descriptive n...
    • daa6526 Fix incorrect handling of xs:lists with encoded spaces: they still act as d...
    • 1373eb1 Rename next_text to read_string because new name are better describes the...
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update quick-xml requirement from 0.22.0 to 0.26.0

    Update quick-xml requirement from 0.22.0 to 0.26.0

    Updates the requirements on quick-xml to permit the latest version.

    Changelog

    Sourced from quick-xml's changelog.

    0.26.0 -- 2022-10-23

    Misc Changes

    • #481: Removed the uses of const fn added in version 0.24 in favor of a lower minimum supported Rust version (1.46.0). Minimum supported Rust version is now verified in the CI.
    • #489: Reduced the size of the package uploaded into the crates.io by excluding tests, examples, and benchmarks.

    #481: tafia/quick-xml#481 #489: tafia/quick-xml#489

    0.25.0 -- 2022-09-10

    Bug Fixes

    • #469: Fix incorrect parsing of CDATA and comments when using buffered readers

    Misc Changes

    • #468: Content of DeError::Unsupported changed from &'static str to Cow<'static, str>
    • #468: Ensure that map keys are restricted to only types that can be serialized as primitives

    #468: tafia/quick-xml#468 #469: tafia/quick-xml#469

    0.24.1 -- 2022-09-10

    Bug Fixes

    • #469: Fix incorrect parsing of CDATA and comments when using buffered readers

    #469: tafia/quick-xml#469

    0.24.0 -- 2022-08-28

    New Features

    • #387: Allow overlapping between elements of sequence and other elements (using new feature overlapped-lists)
    • #393: New module name with QName, LocalName, Namespace, Prefix and PrefixDeclaration wrappers around byte arrays and ResolveResult with the result of namespace resolution
    • #180: Make Decoder struct public. You already had access to it via the Reader::decoder() method, but could not name it in the code. Now the preferred way to access decoding functionality is via this struct
    • #395: Add support for XML Schema xs:list
    • #324: Reader::from_str / Deserializer::from_str / from_str now ignore the XML declared encoding and always use UTF-8
    • #416: Add borrow() methods in all event structs which allows to get

    ... (truncated)

    Commits
    • 7c423ce Release 0.26.0
    • 76335ae Remove outdated note in readme
    • 8fda027 Add changelog entry for #489
    • 9c32654 Add explicit paths to tests and benches
    • c3cf135 Exclude unnecessary files from package
    • 240f204 Merge pull request #481 from dralley/msrv
    • b8cdc1f Drop const fn from places where it was previously added in 0.24
    • da5f1e7 Update versions of dependencies
    • 64b2c4b Add changelog for 0.23.1 and 0.24.1
    • d710eba Release 0.25.0
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update quick-xml requirement from 0.22.0 to 0.25.0

    Update quick-xml requirement from 0.22.0 to 0.25.0

    Updates the requirements on quick-xml to permit the latest version.

    Changelog

    Sourced from quick-xml's changelog.

    0.25.0 -- 2022-09-10

    Bug Fixes

    • #469: Fix incorrect parsing of CDATA and comments when using buffered readers

    Misc Changes

    • #468: Content of DeError::Unsupported changed from &'static str to Cow<'static, str>
    • #468: Ensure that map keys are restricted to only types that can be serialized as primitives

    #468: tafia/quick-xml#468 #469: tafia/quick-xml#469

    0.24.1 -- 2022-09-10

    Bug Fixes

    • #469: Fix incorrect parsing of CDATA and comments when using buffered readers

    #469: tafia/quick-xml#469

    0.24.0 -- 2022-08-28

    New Features

    • #387: Allow overlapping between elements of sequence and other elements (using new feature overlapped-lists)
    • #393: New module name with QName, LocalName, Namespace, Prefix and PrefixDeclaration wrappers around byte arrays and ResolveResult with the result of namespace resolution
    • #180: Make Decoder struct public. You already had access to it via the Reader::decoder() method, but could not name it in the code. Now the preferred way to access decoding functionality is via this struct
    • #395: Add support for XML Schema xs:list
    • #324: Reader::from_str / Deserializer::from_str / from_str now ignore the XML declared encoding and always use UTF-8
    • #416: Add borrow() methods in all event structs which allows to get a borrowed version of any event
    • #437: Split out namespace reading functionality to a dedicated NsReader, namely:
      Old function in Reader New function in NsReader
      read_event -- borrow from input
      read_resolved_event -- borrow from input
      read_event_into
      read_namespaced_event read_resolved_event_into
      resolve
      event_namespace resolve_element
      attribute_namespace resolve_attribute
    • #439: Added utilities detect_encoding() and decode() under the quick-xml::encoding namespace.

    ... (truncated)

    Commits
    • d710eba Release 0.25.0
    • a10b1c3 Merge pull request #471 from Mingun/fix-buffered-parsing
    • 75823d5 Fix incorrect reading of CDATA and comments when end sequence crosses the bou...
    • e052a46 Add tests for #469
    • f8b292b Merge pull request #468 from Mingun/ser-tests
    • b2d57e6 Ensure that map keys are restricted to only types that can be serialized as p...
    • 0336dcb Change DeError::Unsupported to store Cow instead of plain &str
    • 6043d57 Add a special cases of structs: Empty and with $value field
    • 49d918d Rewrite tests using macros
    • 06ef1fc Move all "new" tests into with_root module
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update quick-xml requirement from 0.22.0 to 0.24.0

    Update quick-xml requirement from 0.22.0 to 0.24.0

    Updates the requirements on quick-xml to permit the latest version.

    Changelog

    Sourced from quick-xml's changelog.

    0.24.0 -- 2022-08-28

    New Features

    • #387: Allow overlapping between elements of sequence and other elements (using new feature overlapped-lists)
    • #393: New module name with QName, LocalName, Namespace, Prefix and PrefixDeclaration wrappers around byte arrays and ResolveResult with the result of namespace resolution
    • #180: Make Decoder struct public. You already had access to it via the Reader::decoder() method, but could not name it in the code. Now the preferred way to access decoding functionality is via this struct
    • #395: Add support for XML Schema xs:list
    • #324: Reader::from_str / Deserializer::from_str / from_str now ignore the XML declared encoding and always use UTF-8
    • #416: Add borrow() methods in all event structs which allows to get a borrowed version of any event
    • #437: Split out namespace reading functionality to a dedicated NsReader, namely:
      Old function in Reader New function in NsReader
      read_event -- borrow from input
      read_resolved_event -- borrow from input
      read_event_into
      read_namespaced_event read_resolved_event_into
      resolve
      event_namespace resolve_element
      attribute_namespace resolve_attribute
    • #439: Added utilities detect_encoding() and decode() under the quick-xml::encoding namespace.
    • #450: Added support of asynchronous tokio readers
    • #455: Change return type of all read_to_end* methods to return a span between tags
    • #455: Added Reader::read_text method to return a raw content (including markup) between tags
    • #459: Added a Writer::write_bom() method for inserting a Byte-Order-Mark into the document.
    • #467: The following functions made const:
      • Attr::key
      • Attr::value
      • Attributes::html
      • Attributes::new
      • BytesDecl::from_start
      • Decoder::encoding
      • LocalName::into_inner
      • Namespace::into_inner
      • Prefix::into_inner
      • QName::into_inner
      • Reader::buffer_position
      • Reader::decoder
      • Reader::get_ref
      • Serializer::new
      • Serializer::with_root
      • Writer::new

    ... (truncated)

    Commits
    • 6bedf6c Release 0.24.0
    • 9598c37 Add warning about unsupported encodings
    • 60dc37f Correctly detect UTF-16 encoding even without BOM
    • 7f34520 Add tests for encoding detection
    • d7dae47 Move documents to test encodings to a sub-folder
    • 1b0259d Remove excess test
    • b8f4b11 Merge Decoder methods to avoid wrong remark about necessarily of encoding f...
    • 59c5d4e Remove unused decode_with_bom_removal method and free function
    • 17aa87c Specify required features for a test
    • e5bbcf2 Move fuzzing tests from encoding to a dedicated file
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update quick-xml requirement from 0.22.0 to 0.23.0

    Update quick-xml requirement from 0.22.0 to 0.23.0

    Updates the requirements on quick-xml to permit the latest version.

    Changelog

    Sourced from quick-xml's changelog.

    0.23.0 -- 2022-05-08

    • feat: add support for i128 / u128 in attributes or text/CDATA content
    • test: add tests for malformed inputs for serde deserializer
    • fix: allow to deserialize units from any data in attribute values and text nodes
    • refactor: unify errors when EOF encountered during serde deserialization
    • test: ensure that after deserializing all XML was consumed
    • feat: add Deserializer::from_str, Deserializer::from_slice and Deserializer::from_reader
    • refactor: deprecate from_bytes and Deserializer::from_borrowing_reader because they are fully equivalent to from_slice and Deserializer::new
    • refactor: reduce number of unnecessary copies when deserialize numbers/booleans/identifiers from the attribute and element names and attribute values
    • fix: allow to deserialize units from text and CDATA content. DeError::InvalidUnit variant is removed, because after fix it is no longer used
    • fix: ElementWriter, introduced in #274 (0.23.0-alpha2) now available to end users
    • fix: allow lowercase <!doctype > definition (used in HTML 5) when parse document from &[u8]
    • test: add tests for consistence behavior of buffered and borrowed readers
    • fix: produce consistent error positions in buffered and borrowed readers
    • feat: Error::UnexpectedBang now provide the byte found
    • refactor: unify code for buffered and borrowed readers
    • fix: fix internal panic message when parse malformed XML (#344)
    • test: add tests for trivial documents (empty / only comment / <root>...</root> -- one tag with content)
    • fix: CDATA was not handled in many cases where it should
    • fix: do not unescape CDATA content because it never escaped by design. CDATA event data now represented by its own BytesCData type (quick-xml#311)
    • feat: add Reader::get_ref() and Reader::get_mut(), rename Reader::into_underlying_reader() to Reader::into_inner()
    • refactor: now Attributes::next() returns a new type AttrError when attribute parsing failed (#4)
    • test: properly test all paths of attributes parsing (#4)
    • feat: attribute iterator now implements FusedIterator (#4)
    • fix: fixed many errors in attribute parsing using iterator, returned from attributes() or html_attributes() (#4)

    0.23.0-alpha3

    • fix: use element name (with namespace) when unflattening (serialize feature)

    0.23.0-alpha2

    • fix: failing tests with features

    0.23.0-alpha1

    • style: convert to rust edition 2018
    • fix: don't encode multi byte escape characters as big endian
    • feat: add Writer::write_nested_event

    ... (truncated)

    Commits
    • 73e38f9 Swap quick-xml references with fast-xml once again
    • a181d0a Release 0.23.0
    • f9453b9 Follow up for #4 - forgot to save changes in the editor
    • 30e0c23 Merge pull request #4 from Mingun/fix-attributes
    • c81d25c Reimplement attributes parsing logic and fix all errors
    • d516e45 Properly test all paths of attribute parsing
    • 317ab14 Use AttrError in the Attributes iterator return type
    • f93259a Use dedicated comparable error type for attribute parsing errors
    • e7dda45 Error kind NameWithQuote never triggered, remove it
    • 6b82fc3 Remove period from error messages for consistency and rephrase some messages
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update quick-xml requirement from 0.22.0 to 0.27.1

    Update quick-xml requirement from 0.22.0 to 0.27.1

    Updates the requirements on quick-xml to permit the latest version.

    Release notes

    Sourced from quick-xml's releases.

    Fix an infinite loop in some circumstates

    What's Changed

    Bug Fixes

    • #530: Fix an infinite loop leading to unbounded memory consumption that occurs when skipping events on malformed XML with the overlapped-lists feature active.
    • #530: Fix an error in the Deserializer::read_to_end when overlapped-lists feature is active and malformed XML is parsed

    #530: tafia/quick-xml#530

    Full Changelog: https://github.com/tafia/quick-xml/compare/v0.27.0...v0.27.1

    Changelog

    Sourced from quick-xml's changelog.

    0.27.1 -- 2022-12-28

    Bug Fixes

    • #530: Fix an infinite loop leading to unbounded memory consumption that occurs when skipping events on malformed XML with the overlapped-lists feature active.
    • #530: Fix an error in the Deserializer::read_to_end when overlapped-lists feature is active and malformed XML is parsed

    #530: tafia/quick-xml#530

    0.27.0 -- 2022-12-25

    New Features

    • #521: Implement Clone for all error types. This required changing Error::Io to contain Arc<std::io::Error> instead of std::io::Error since std::io::Error does not implement Clone.

    Bug Fixes

    • #490: Ensure that serialization of map keys always produces valid XML names. In particular, that means that maps with numeric and numeric-like keys (for example, "42") no longer can be serialized because [XML name] cannot start from a digit
    • #500: Fix deserialization of top-level sequences of enums, like
      <?xml version="1.0" encoding="UTF-8"?>
      <!-- list of enum Enum { A, B, Π‘ } -->
      <A/>
      <B/>
      <C/>
      
    • #514: Fix wrong reporting Error::EndEventMismatch after disabling and enabling .check_end_names
    • #517: Fix swapped codes for \r and \n characters when escaping them
    • #523: Fix incorrect skipping text and CDATA content before any map-like structures in serde deserializer, like
      unwanted text<struct>...</struct>
      
    • #523: Fix incorrect handling of xs:lists with encoded spaces: they still act as delimiters, which is confirmed also by mature XmlBeans Java library
    • #473: Fix a hidden requirement to enable serde's derive feature to get quick-xml's serialize feature for edition = 2021 or resolver = 2 crates

    Misc Changes

    • #490: Removed $unflatten= special prefix for fields for serde (de)serializer, because:
      • it is useless for deserializer

    ... (truncated)

    Commits
    • 89fa620 Release 0.27.1 - fix for #530
    • b99adec Remove excess test. That test is duplicated by read_to_end::complex
    • 88455b4 Fix an error in the Deserializer::read_to_end when feature "overlapped-list...
    • 75ae6c7 Add test for reading invalid XML to the end
    • 85eeb2e Fix infinity loop in skip when parsing malformed XML
    • f63910d Release 0.27.0
    • d1908e6 Merge pull request #528 from Mingun/doc
    • 66275cc Add an example for deserializing wrapped lists
    • c521a2f Add documentation for mapping from XML to Rust used by deserializer
    • 44a4c69 Merge pull request #524 from Mingun/serde
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
Releases(v0.1.1)
  • v0.1.1(Jan 15, 2022)

    Added

    • pubchem::Compound::synonyms to retrieve synonym names for a compound.
    • pubchem::Compounds to query properties from multiple compounds.
    • Deref, DerefMut and IntoIterator implementations for pubchem::model::rest::PropertyTable.
    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Jan 15, 2022)

Owner
Martin Larralde
PhD candidate in Bioinformatics, passionate about programming, Pythonista, Rustacean. I write poems, and sometimes they are executable.
Martin Larralde
Coding-challenge - Algorithms and Data-structures, problems and solutions in Rust language using cargo-workspaces

Coding Challenge LeetCode/Hackerrank e.t.c Using this as an opportunity to improve my knowledge of rust lang If you found this repo useful to you, add

Tolumide Shopein 17 Apr 24, 2022
Rust-algorithm-club - Learn algorithms and data structures with Rust

Rust Algorithm Club ?? ?? This repo is under construction. Most materials are written in Chinese. Check it out here if you are able to read Chinese. W

Weihang Lo 360 Dec 28, 2022
Algorithms and Data Structures of all kinds written in Rust.

Classic Algorithms in Rust This repo contains the implementation of various classic algorithms for educational purposes in Rust. Right now, it is in i

Alexander GonzΓ‘lez 49 Dec 14, 2022
Common data structures and algorithms in Rust

Contest Algorithms in Rust A collection of classic data structures and algorithms, emphasizing usability, beauty and clarity over full generality. As

Aram Ebtekar 3.3k Dec 27, 2022
rust_aads - Rust Algorithms And Data Structures

rust_aads - Rust Algorithms And Data Structures rust_aads is an open repository with algorithms and data structures, used in computer science and comp

stepa 2 Dec 15, 2022
Obake is a procedural macro for declaring and maintaining versioned data-structures.

Obake is a procedural macro for declaring and maintaining versioned data-structures. The name 'obake' is taken from the Japanese 'γŠεŒ–γ‘ (γŠγ°γ‘)', a class of supernatural beings in Japanese folklore that shapeshift.

Nathan Corbyn 174 Dec 26, 2022
Fast, efficient, and robust memory reclamation for concurrent data structures

Seize Fast, efficient, and robust memory reclamation for concurrent data structures. Introduction Concurrent data structures are faced with the proble

Ibraheem Ahmed 240 Dec 23, 2022
Rust Persistent Data Structures

Rust Persistent Data Structures Rust Persistent Data Structures provides fully persistent data structures with structural sharing. Setup To use rpds a

Diogo Sousa 883 Dec 31, 2022
A proof of concept implementation of cyclic data structures in stable, safe, Rust.

A proof of concept implementation of cyclic data structures in stable, safe, Rust. This demonstrates the combined power of the static-rc crate and the

null 157 Dec 28, 2022
Rust library for string parsing of basic data structures.

afmt Simple rust library for parsing basic data structures from strings. Usage You can specify string formats to any strucute, via the use of the fmt

Eduard 4 May 8, 2021
Library containing various Data Structures implemented using Rust.

rust-data-structures Library containing various Data Structures implemented using Rust. Running You can test the library by running cargo test, an exa

c1m50c 1 Jan 6, 2022
A library for comparing data structures in Rust, oriented toward testing

Delta: Structural differencing in Rust The delta crate defines the trait Delta, along with a derive macro for auto-generating instances of this trait

John Wiegley 19 Oct 7, 2022
A library for comparing data structures in Rust, oriented toward testing

The comparable crate defines the trait [Comparable], along with a derive macro for auto-generating instances of this trait for most data types. Primar

John Wiegley 19 Oct 7, 2022
Collection of Data Structures in Rust

cds - Collection of Data Structures !!! UNDER CONSTRUCTION !!! The version v0.0.1 is a crates.io placeholder. License Licensed under either of Apache

Rafael Buchbinder 2 May 23, 2022
Succinct data structures in Rust

sucds: Succinct data structures in Rust sucds contains some succinct data structures written in Rust. Data structures So far, the following data struc

Shunsuke Kanda 43 Dec 3, 2022
Dade is data definition for Rust structures.

dade dade is data definition for Rust structures. For the easy handle of data, the following will support it. Data validation. Data schema conforms Js

odd 3 May 1, 2022
NixEl is a Rust library that turns Nix code into a variety of correct, typed, memory-safe data-structures

?? NixEL Lexer, Parser, Abstract Syntax Tree and Concrete Syntax Tree for the Nix Expressions Language. NixEl is a Rust library that turns Nix code in

Kevin Amado 56 Dec 29, 2022
This repository aims to organize codes related to data structures in Rust. πŸ¦€

Rust Data Structure A project with the objective of introducing the main concepts about data structure using Rust! Explore the docs and learn Rust Β» R

guto 12 Apr 3, 2023
Garbage Collector(Hyaline- Safe Memory Reclaimation) for lock free data structures

Hyaline-SMR This crate provides garbage collection using hyaline algorithm for building concurrent data structures. When a thread removes an object fr

Abishek 2 Dec 21, 2022