Skip to content

Commit fca8edf

Browse files
Made the Error type public
1 parent d007a8e commit fca8edf

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/error.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
use thiserror::Error;
22

3+
/// [`Result`](std::result::Result) type that is returned from functions with error
4+
/// as [`TypesenseError`](crate::error::TypesenseError).
35
pub type Result<T> = std::result::Result<T, TypesenseError>;
46

7+
/// Represents an error that can occur while using the library.
58
#[derive(Error, Debug)]
69
pub enum TypesenseError {
710
/// Config error.

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
//! Welcome to typesense, the rust library for the Typesense API.
55
66
mod error;
7+
8+
pub use error::{Result, TypesenseError};

0 commit comments

Comments
 (0)