Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add public getters for Node properties #13

Merged
merged 6 commits into from
Feb 21, 2024

Conversation

lorenzocerrone
Copy link
Contributor

Feature requested in #12

Changes:

  • implement three getter methods for the zarrs::Node struct
/// Returns a reference to the path of the node.
    #[must_use] 
    pub fn path(&self) -> &NodePath {
        &self.path
    }

    /// Returns a reference to the metadata of the node.
    #[must_use]
    pub fn metadata(&self) -> &NodeMetadata {
        &self.metadata
    }

    /// Returns a reference to the metadata of the node.
    #[must_use]
    pub fn children(&self) -> &Vec<Node> {
        &self.children
    }
  • Derived clone traits for zarrs::Node and zarrs::node::NodeMetadata

Copy link

codecov bot commented Feb 21, 2024

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (ef43dbb) 81.63% compared to head (61e41ab) 81.59%.

Files Patch % Lines
src/node.rs 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #13      +/-   ##
==========================================
- Coverage   81.63%   81.59%   -0.04%     
==========================================
  Files         127      127              
  Lines       18606    18615       +9     
==========================================
  Hits        15189    15189              
- Misses       3417     3426       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LDeakin LDeakin changed the title Add public getters for nNode properties Add public getters for Node properties Feb 21, 2024
@LDeakin LDeakin merged commit d0da392 into LDeakin:main Feb 21, 2024
16 of 18 checks passed
@LDeakin
Copy link
Owner

LDeakin commented Feb 21, 2024

Thanks @lorenzocerrone and best of luck with your project!

@lorenzocerrone
Copy link
Contributor Author

Awesome, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants