pub struct MethodMeta {
pub name: &'static str,
pub class: MethodClass,
pub min_role: Role,
pub rate_bucket: RateBucket,
pub public_exposed: bool,
}Expand description
Per-method metadata.
Fields§
§name: &'static strJSON-RPC method name (snake_case).
class: MethodClassClassification.
min_role: RoleMinimum role.
rate_bucket: RateBucketRate bucket.
public_exposed: boolWhether the method is served on the public (non-admin) port.
Implementations§
Source§impl MethodMeta
impl MethodMeta
Sourcepub const fn read(
name: &'static str,
min_role: Role,
bucket: RateBucket,
) -> Self
pub const fn read( name: &'static str, min_role: Role, bucket: RateBucket, ) -> Self
Convenience builder for a read-only method.
Sourcepub const fn write(
name: &'static str,
min_role: Role,
bucket: RateBucket,
) -> Self
pub const fn write( name: &'static str, min_role: Role, bucket: RateBucket, ) -> Self
Convenience builder for a write method. Never public-exposed.
Trait Implementations§
Source§impl Clone for MethodMeta
impl Clone for MethodMeta
Source§fn clone(&self) -> MethodMeta
fn clone(&self) -> MethodMeta
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for MethodMeta
impl RefUnwindSafe for MethodMeta
impl Send for MethodMeta
impl Sync for MethodMeta
impl Unpin for MethodMeta
impl UnsafeUnpin for MethodMeta
impl UnwindSafe for MethodMeta
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