hyperlane/server/
type.rs

1use crate::*;
2
3/// A type alias for server operation result.
4///
5/// This is commonly used throughout the server's public-facing API.
6pub type ServerResult<T> = Result<T, ServerError>;
7/// A type alias for task join result.
8///
9/// This is used when waiting for asynchronous tasks to complete.
10pub type TaskJoinResult<T> = Result<T, JoinError>;
11/// A type alias for shared server state.
12///
13/// This is the core mechanism for sharing server state across threads.
14pub(crate) type SharedServerState = ArcRwLock<ServerInner>;
15/// A type alias for shared server configuration.
16///
17/// This is the core mechanism for sharing server config state across threads.
18pub(crate) type SharedServerConfig = ArcRwLock<ServerConfigInner>;
19/// A type alias for server state read guard.
20///
21/// This provides read-only access to the server's internal state.
22pub(crate) type ServerStateReadGuard<'a> = RwLockReadGuard<'a, ServerInner>;
23/// A type alias for server state write guard.
24///
25/// This provides mutable access to the server's internal state.
26pub(crate) type ServerStateWriteGuard<'a> = RwLockWriteGuard<'a, ServerInner>;