Skip to content

Commit

Permalink
improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellga committed Jun 20, 2024
1 parent 6e4b01b commit 622100e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
1 change: 1 addition & 0 deletions r-harmonium/src/rust/src/haudioop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use savvy::{savvy, Sexp};
///
/// # Methods
///
#[savvy]
pub struct HAudioOp;

#[savvy]
Expand Down
22 changes: 17 additions & 5 deletions r-harmonium/src/rust/src/hfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,27 @@ use harmonium_io::decode;
use savvy::{savvy, OwnedIntegerSexp, OwnedListSexp, OwnedRealSexp, OwnedStringSexp, Sexp};
use std::sync::Arc;

/// HFile
/// A collection of methods designed to streamline input and output operations. \
///
/// # Methods
///
#[savvy]
struct HFile;

/// HDecoderStream
/// An iterator that decodes audio in streams. \
///
/// # Methods
///
#[savvy]
struct HDecoderStream(Box<dyn HDecoderStreamR>);

/// HDecodedAudio
/// An audio represented by an HArray of samples and its corresponding sampling rate. \
///
/// # Methods
///
#[savvy]
struct HDecodedAudio {
harray: HArray,
Expand Down Expand Up @@ -421,11 +438,6 @@ impl HFile {
}
}

/// HDecoderStream
/// An iterator that decodes audio in streams. \
///
/// # Methods
///
#[savvy]
impl HDecoderStream {
/// HDecoderStream
Expand Down
3 changes: 1 addition & 2 deletions r-harmonium/src/rust/src/partialeq.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use crate::{harrayr::HArrayR, hdatatype::HDataType};
use ndarray::IxDyn;
use num_complex::Complex;
use std::sync::Arc;

use crate::{harrayr::HArrayR, hdatatype::HDataType};

fn equal_harray(lhs: &dyn HArrayR, rhs: &dyn HArrayR) -> bool {
if lhs.dtype() != rhs.dtype() {
return false;
Expand Down

0 comments on commit 622100e

Please sign in to comment.