Struct starlark::typing::Approximation
source · pub struct Approximation {
pub category: &'static str,
pub message: String,
}
Expand description
A typing operation wasn’t able to produce a precise result, so made some kind of approximation.
Fields§
§category: &'static str
The category of the approximation, e.g. "Unknown type"
.
message: String
The precise details of this approximation, e.g. which type was unknown.
Implementations§
source§impl Approximation
impl Approximation
sourcepub fn new(category: &'static str, message: impl Debug) -> Self
pub fn new(category: &'static str, message: impl Debug) -> Self
Create a new Approximation
.
Trait Implementations§
source§impl Clone for Approximation
impl Clone for Approximation
source§fn clone(&self) -> Approximation
fn clone(&self) -> Approximation
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Approximation
impl Debug for Approximation
source§impl Display for Approximation
impl Display for Approximation
source§impl Hash for Approximation
impl Hash for Approximation
source§impl Ord for Approximation
impl Ord for Approximation
source§fn cmp(&self, other: &Approximation) -> Ordering
fn cmp(&self, other: &Approximation) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for Approximation
impl PartialEq for Approximation
source§fn eq(&self, other: &Approximation) -> bool
fn eq(&self, other: &Approximation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for Approximation
impl PartialOrd for Approximation
source§fn partial_cmp(&self, other: &Approximation) -> Option<Ordering>
fn partial_cmp(&self, other: &Approximation) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Approximation
impl StructuralPartialEq for Approximation
Auto Trait Implementations§
impl RefUnwindSafe for Approximation
impl Send for Approximation
impl Sync for Approximation
impl Unpin for Approximation
impl UnwindSafe for Approximation
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.