#[non_exhaustive]pub enum MethodRole {
Rpc,
StaticChild,
DynamicChild {
list_method: Option<String>,
search_method: Option<String>,
},
}Expand description
Describes how a method participates in the activation graph.
Every method on a plugin is exactly one of three kinds:
Rpc— a regular RPC endpoint (the default).StaticChild— the method returns a child activation by a static name (no lookup argument). Used by#[child]-annotated methods on hubs.DynamicChild { .. }— the method gates a dynamic child keyed by its argument.list_methodoptionally names a sibling method that enumerates available keys, andsearch_methodoptionally names a sibling method that searches keys.
This tag is consumed by downstream tooling (synapse, synapse-cc,
introspection clients) to reconstruct the child graph without a separate
side-table. Today’s macros emit MethodRole::Rpc for every method; IR-3
populates child roles from #[child] annotations.
§Wire back-compat
Added in IR-2. Serde defaults to Rpc for pre-IR schemas.
#[non_exhaustive] reserves space for future variants without breaking
downstream match arms.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Rpc
Method is an RPC endpoint (the default for ordinary methods).
StaticChild
Method returns a child activation by static name (no lookup arg).
DynamicChild
Method gates a dynamic child keyed by its argument.
Trait Implementations§
Source§impl Clone for MethodRole
impl Clone for MethodRole
Source§fn clone(&self) -> MethodRole
fn clone(&self) -> MethodRole
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 moreSource§impl Debug for MethodRole
impl Debug for MethodRole
Source§impl Default for MethodRole
impl Default for MethodRole
Source§impl<'de> Deserialize<'de> for MethodRole
impl<'de> Deserialize<'de> for MethodRole
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for MethodRole
impl JsonSchema for MethodRole
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for MethodRole
impl PartialEq for MethodRole
Source§impl Serialize for MethodRole
impl Serialize for MethodRole
impl Eq for MethodRole
impl StructuralPartialEq for MethodRole
Auto Trait Implementations§
impl Freeze for MethodRole
impl RefUnwindSafe for MethodRole
impl Send for MethodRole
impl Sync for MethodRole
impl Unpin for MethodRole
impl UnsafeUnpin for MethodRole
impl UnwindSafe for MethodRole
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.