pub struct HostError { /* private fields */ }Expand description
A typed host/runtime failure, kept separate from the operation’s application return type.
The effect guarantee is mandatory. Host runtimes must ignore the diagnostic when producing a wire response; it is bounded here for local observability but can still contain backend-private information.
Implementations§
Source§impl HostError
impl HostError
Sourcepub fn internal(
message: impl Into<String>,
effect_guarantee: EffectGuarantee,
) -> Self
pub fn internal( message: impl Into<String>, effect_guarantee: EffectGuarantee, ) -> Self
Creates an internal Host failure with an explicit effect guarantee.
Sourcepub fn resource_limit(
message: impl Into<String>,
effect_guarantee: EffectGuarantee,
) -> Self
pub fn resource_limit( message: impl Into<String>, effect_guarantee: EffectGuarantee, ) -> Self
Creates a resource-limit Host failure with an explicit effect guarantee.
Sourcepub fn kind(&self) -> HostErrorKind
pub fn kind(&self) -> HostErrorKind
Returns the typed Host failure category.
Sourcepub fn effect_guarantee(&self) -> EffectGuarantee
pub fn effect_guarantee(&self) -> EffectGuarantee
Returns the operation-effect guarantee attached by the implementation.
Trait Implementations§
impl Eq for HostError
Source§impl Error for HostError
impl Error for HostError
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()
impl StructuralPartialEq for HostError
Auto Trait Implementations§
impl Freeze for HostError
impl RefUnwindSafe for HostError
impl Send for HostError
impl Sync for HostError
impl Unpin for HostError
impl UnsafeUnpin for HostError
impl UnwindSafe for HostError
Blanket Implementations§
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