pub struct MethodDef {
pub md_name: String,
pub md_full_path: String,
pub md_namespace: String,
pub md_description: Option<String>,
pub md_streaming: bool,
pub md_params: Vec<ParamDef>,
pub md_returns: TypeRef,
pub md_bidir_type: Option<TypeRef>,
}Expand description
Method definition
Fields§
§md_name: String§md_full_path: String§md_namespace: String§md_description: Option<String>§md_streaming: bool§md_params: Vec<ParamDef>§md_returns: TypeRef§md_bidir_type: Option<TypeRef>Bidirectional channel type parameter T.
When a method uses BidirChannel<StandardRequest<T>, StandardResponse<T>> or
Arc<StandardBidirChannel> (the T=Value default), this field describes T.
None→ the method is not bidirectional, OR it uses the defaultT = serde_json::Value(i.e.,StandardBidirChannel)Some(TypeRef::RefAny)→ bidirectional with T=Value (explicit marker)Some(TypeRef::RefNamed(...))→ bidirectional with a specific T type
§Schema field
The synapse IR builder populates this from the "bidirType" field in the
method schema JSON (emitted when bidirectional: true in MethodSchema
with a non-Value request_type). When the schema only has
bidirectional: true but no bidir_type field, None is emitted.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MethodDef
impl<'de> Deserialize<'de> for MethodDef
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
Auto Trait Implementations§
impl Freeze for MethodDef
impl RefUnwindSafe for MethodDef
impl Send for MethodDef
impl Sync for MethodDef
impl Unpin for MethodDef
impl UnsafeUnpin for MethodDef
impl UnwindSafe for MethodDef
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