#[non_exhaustive]pub struct Protocol {
pub name: &'static str,
pub hash: Hash,
}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 strThe name of the builtin function.
hash: HashThe 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>>