pub type Result<T> = Result<T, ChatpackError>;
A specialized Result type for chatpack operations.
Result
This type is broadly used across the library for any operation that may produce an error.
use chatpack::error::Result; use chatpack::Message; fn my_function() -> Result<Vec<Message>> { // ... operations that may fail Ok(vec![]) }
pub enum Result<T> { Ok(T), Err(ChatpackError), }
Contains the success value
Contains the error value