#[repr(i32)]pub enum MethodType {
Undefined = 0,
Proofable = 1,
Unproofable = 2,
NotSupported = 3,
Local = 4,
}Expand description
Support level returned by c4_get_method_support for an RPC method.
The values match the underlying c4_method_type_t enum in the C core
(see bindings/colibri.h).
Variants§
Undefined = 0
Method is not defined / not recognised.
Proofable = 1
Method can be cryptographically proven – run a proof + verify.
Unproofable = 2
Method exists but cannot be proven – call the RPC directly.
NotSupported = 3
Method is not supported by Colibri at all.
Local = 4
Method can be computed locally (e.g. eth_chainId).
Implementations§
Source§impl MethodType
impl MethodType
Sourcepub fn from_support_code(code: i32) -> Self
pub fn from_support_code(code: i32) -> Self
Map the raw integer returned by c4_get_method_support to
MethodType. Unknown values fall back to MethodType::Undefined.
Sourcepub fn is_supported(&self) -> bool
pub fn is_supported(&self) -> bool
true for methods that produce a meaningful result via Colibri –
either through a proof, a direct RPC pass-through or a local
computation.
Sourcepub fn requires_proof(&self) -> bool
pub fn requires_proof(&self) -> bool
true when the method is expected to go through the full proof
generation + verification pipeline.
Trait Implementations§
Source§impl Clone for MethodType
impl Clone for MethodType
Source§fn clone(&self) -> MethodType
fn clone(&self) -> MethodType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MethodType
Source§impl Debug for MethodType
impl Debug for MethodType
Source§impl<'de> Deserialize<'de> for MethodType
impl<'de> Deserialize<'de> for MethodType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for MethodType
Source§impl PartialEq for MethodType
impl PartialEq for MethodType
Source§impl Serialize for MethodType
impl Serialize for MethodType
impl StructuralPartialEq for MethodType
Auto Trait Implementations§
impl Freeze for MethodType
impl RefUnwindSafe for MethodType
impl Send for MethodType
impl Sync for MethodType
impl Unpin for MethodType
impl UnsafeUnpin for MethodType
impl UnwindSafe for MethodType
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.