pub struct RpcError {
pub error_type: String,
pub message: String,
pub traceback: String,
pub request_id: String,
}Expand description
An RPC-level error, serialized on the wire as an EXCEPTION log batch.
Fields§
§error_type: StringError category (matches Python exception class names: “ValueError”, “RuntimeError”, “TypeError”, “ProtocolError”, “VersionError”, …).
message: StringHuman-readable error message.
traceback: StringOptional stack trace or remote traceback string.
request_id: StringOptional request ID attached when the error was produced.
Implementations§
Source§impl RpcError
impl RpcError
pub fn new(error_type: impl Into<String>, message: impl Into<String>) -> Self
pub fn value_error(msg: impl Into<String>) -> Self
pub fn runtime_error(msg: impl Into<String>) -> Self
pub fn type_error(msg: impl Into<String>) -> Self
pub fn protocol_error(msg: impl Into<String>) -> Self
pub fn version_error(msg: impl Into<String>) -> Self
pub fn permission_error(msg: impl Into<String>) -> Self
pub fn attribute_error(msg: impl Into<String>) -> Self
Sourcepub fn session_lost_error(msg: impl Into<String>) -> Self
pub fn session_lost_error(msg: impl Into<String>) -> Self
Sticky-session token did not resolve to a live registry entry
(missing, expired, evicted, wrong worker, or principal mismatch).
Mirrors Python’s vgi_rpc.rpc.SessionLostError.
Sourcepub fn server_draining_error(msg: impl Into<String>) -> Self
pub fn server_draining_error(msg: impl Into<String>) -> Self
Server is draining: new ctx.open_session calls are rejected while
existing sessions continue to serve. Mirrors Python’s
vgi_rpc.rpc.ServerDrainingError.
Trait Implementations§
Source§impl Error for RpcError
impl Error for RpcError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ArrowError> for RpcError
impl From<ArrowError> for RpcError
Source§fn from(e: ArrowError) -> Self
fn from(e: ArrowError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RpcError
impl RefUnwindSafe for RpcError
impl Send for RpcError
impl Sync for RpcError
impl Unpin for RpcError
impl UnsafeUnpin for RpcError
impl UnwindSafe for RpcError
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more