pub struct PromoteError {
pub type_name: &'static str,
pub memory: Option<MemoryLimitExceeded>,
}Expand description
Returned when a Value cannot be promoted to SharedValue.
Fields§
§type_name: &'static str§memory: Option<MemoryLimitExceeded>Set when the value is promotable but the governor refused its shared allocation (strict mode).
Implementations§
Source§impl PromoteError
impl PromoteError
pub fn not_promotable(type_name: &'static str) -> Self
Sourcepub fn memory_limit(type_name: &'static str, error: MemoryLimitExceeded) -> Self
pub fn memory_limit(type_name: &'static str, error: MemoryLimitExceeded) -> Self
The governor refused the shared allocation for a type_name value.
Source§impl PromoteError
impl PromoteError
Sourcepub fn into_value_error(self) -> ValueError
pub fn into_value_error(self) -> ValueError
The ValueError a builtin reports for this failure: the memory
refusal itself, or Other with the message.
Trait Implementations§
Source§impl Clone for PromoteError
impl Clone for PromoteError
Source§impl Debug for PromoteError
impl Debug for PromoteError
Source§impl Display for PromoteError
impl Display for PromoteError
Source§impl Error for PromoteError
impl Error for PromoteError
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()
Auto Trait Implementations§
impl Freeze for PromoteError
impl RefUnwindSafe for PromoteError
impl Send for PromoteError
impl Sync for PromoteError
impl Unpin for PromoteError
impl UnsafeUnpin for PromoteError
impl UnwindSafe for PromoteError
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