Skip to content

Commit f4e776c

Browse files
committed
Make Capture methods fallible
1 parent b26cfd8 commit f4e776c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -781,16 +781,16 @@ pub trait Capture {
781781
fn capture(&mut self, channel: Self::Channel) -> nb::Result<Self::Capture, Self::Error>;
782782

783783
/// Disables a capture `channel`
784-
fn disable(&mut self, channel: Self::Channel);
784+
fn disable(&mut self, channel: Self::Channel) -> Result<(), Self::Error>;
785785

786786
/// Enables a capture `channel`
787-
fn enable(&mut self, channel: Self::Channel);
787+
fn enable(&mut self, channel: Self::Channel) -> Result<(), Self::Error>;
788788

789789
/// Returns the current resolution
790-
fn get_resolution(&self) -> Self::Time;
790+
fn get_resolution(&self) -> Result<Self::Time, Self::Error>;
791791

792792
/// Sets the resolution of the capture timer
793-
fn set_resolution<R>(&mut self, resolution: R)
793+
fn set_resolution<R>(&mut self, resolution: R) -> Result<(), Self::Error>
794794
where
795795
R: Into<Self::Time>;
796796
}

0 commit comments

Comments
 (0)