I'm trying to understand a function similar to the following:
fn some_func(arg1: str, arg2: str) -> error::Result<()>
{
/// Do some stuff ...
Ok(())
}
What does the ()
given to Ok
and Result
mean in this case? Is this idiomatic or an implementation detail of the codebase?
Update: Compiled the following code block which may serve as a more useful MVCE
fn main() -> Result<(), ()> {
Ok(())
}