#[non_exhaustive]pub struct Protocol {
pub name: &'static str,
pub hash: Hash,
/* private fields */
}
Expand description
A built in instance function.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: &'static str
The name of the builtin function.
hash: Hash
The hash of the builtin function.
Implementations§
Source§impl Protocol
impl Protocol
pub const GET_HASH: Hash
pub const SET_HASH: Hash
pub const INDEX_GET_HASH: Hash
pub const INDEX_SET_HASH: Hash
Sourcepub const PARTIAL_EQ: Protocol
pub const PARTIAL_EQ: Protocol
Check two types for partial equality.
pub const PARTIAL_EQ_HASH: Hash
pub const EQ_HASH: Hash
Sourcepub const PARTIAL_CMP: Protocol
pub const PARTIAL_CMP: Protocol
Perform an partial comparison between two values.
pub const PARTIAL_CMP_HASH: Hash
pub const CMP_HASH: Hash
pub const ADD_HASH: Hash
Sourcepub const ADD_ASSIGN: Protocol
pub const ADD_ASSIGN: Protocol
The function to implement for the addition assign operation.
pub const ADD_ASSIGN_HASH: Hash
pub const SUB_HASH: Hash
Sourcepub const SUB_ASSIGN: Protocol
pub const SUB_ASSIGN: Protocol
The function to implement for the subtraction assign operation.
pub const SUB_ASSIGN_HASH: Hash
pub const MUL_HASH: Hash
Sourcepub const MUL_ASSIGN: Protocol
pub const MUL_ASSIGN: Protocol
The function to implement for the multiply assign operation.
pub const MUL_ASSIGN_HASH: Hash
pub const DIV_HASH: Hash
Sourcepub const DIV_ASSIGN: Protocol
pub const DIV_ASSIGN: Protocol
The function to implement for the division assign operation.
pub const DIV_ASSIGN_HASH: Hash
pub const REM_HASH: Hash
Sourcepub const REM_ASSIGN: Protocol
pub const REM_ASSIGN: Protocol
The function to implement for the remainder assign operation.
pub const REM_ASSIGN_HASH: Hash
pub const BIT_AND_HASH: Hash
Sourcepub const BIT_AND_ASSIGN: Protocol
pub const BIT_AND_ASSIGN: Protocol
The function to implement for the bitwise and assign operation.
pub const BIT_AND_ASSIGN_HASH: Hash
pub const BIT_XOR_HASH: Hash
Sourcepub const BIT_XOR_ASSIGN: Protocol
pub const BIT_XOR_ASSIGN: Protocol
The function to implement for the bitwise xor assign operation.
pub const BIT_XOR_ASSIGN_HASH: Hash
pub const BIT_OR_HASH: Hash
Sourcepub const BIT_OR_ASSIGN: Protocol
pub const BIT_OR_ASSIGN: Protocol
The function to implement for the bitwise xor assign operation.
pub const BIT_OR_ASSIGN_HASH: Hash
pub const SHL_HASH: Hash
Sourcepub const SHL_ASSIGN: Protocol
pub const SHL_ASSIGN: Protocol
The function to implement for the bitwise shift left assign operation.
pub const SHL_ASSIGN_HASH: Hash
pub const SHR_HASH: Hash
Sourcepub const SHR_ASSIGN: Protocol
pub const SHR_ASSIGN: Protocol
The function to implement for the bitwise shift right assign operation.
pub const SHR_ASSIGN_HASH: Hash
Sourcepub const STRING_DISPLAY: Protocol
pub const STRING_DISPLAY: Protocol
Protocol function used by template strings.
pub const STRING_DISPLAY_HASH: Hash
Sourcepub const STRING_DEBUG: Protocol
pub const STRING_DEBUG: Protocol
Protocol function used by custom debug impls.
pub const STRING_DEBUG_HASH: Hash
pub const INTO_ITER_HASH: Hash
pub const NEXT_HASH: Hash
Sourcepub const INTO_FUTURE: Protocol
pub const INTO_FUTURE: Protocol
Function used to convert an argument into a future.
Signature: fn(Value) -> Future
.
pub const INTO_FUTURE_HASH: Hash
Sourcepub const INTO_TYPE_NAME: Protocol
pub const INTO_TYPE_NAME: Protocol
Coerce a value into a type name. This is stored as a constant.
pub const INTO_TYPE_NAME_HASH: Hash
Sourcepub const IS_VARIANT: Protocol
pub const IS_VARIANT: Protocol
Function used to test if a value is a specific variant.
Signature: fn(self, usize) -> bool
.
pub const IS_VARIANT_HASH: Hash
Sourcepub const TRY: Protocol
pub const TRY: Protocol
Function used for the question mark operation.
Signature: fn(self) -> Result
.
Note that it uses the Result
like Try
uses ControlFlow
i.e.,
for Result::<T, E>
it should return Result<T, Result<(), E>>
pub const TRY_HASH: Hash
pub const HASH_HASH: Hash
Trait Implementations§
impl Copy for Protocol
impl Eq for Protocol
impl ToTypeHash for Protocol
Auto Trait Implementations§
impl Freeze for Protocol
impl RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl UnwindSafe for Protocol
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.