pub struct MethodCallWrapper<M, P>where
M: MethodCall,
P: MethodCallExt,{
pub method: M,
pub ext: P,
}Expand description
This special bundle’s element can be used to call a method either on the server or on the client. Its interface is quite complicated, so it’s only internal and must be used through public functions.
Fields§
§method: MThe actual wrapped method call.
ext: PThe extension element that is encoded or decoded just before the actual method call.
Implementations§
Source§impl<M, P> MethodCallWrapper<M, P>where
M: MethodCall,
P: MethodCallExt,
impl<M, P> MethodCallWrapper<M, P>where
M: MethodCall,
P: MethodCallExt,
Sourcepub const DEFAULT_LEN: ElementLength
pub const DEFAULT_LEN: ElementLength
The length type to use if now particular length is required, this length defaults to a callback which returns a length depending on the id and the use of sub-slot to represent the method’s id.
pub fn new(method: M, prefix: P) -> Self
pub fn write(self, writer: BundleElementWriter<'_>)
pub fn read( reader: TopElementReader<'_, '_>, ) -> BundleResult<BundleElement<Self>>
Trait Implementations§
Source§impl<M, P> Element for MethodCallWrapper<M, P>where
M: MethodCall,
P: MethodCallExt,
impl<M, P> Element for MethodCallWrapper<M, P>where
M: MethodCall,
P: MethodCallExt,
Source§impl<M, P> TopElement for MethodCallWrapper<M, P>where
M: MethodCall,
P: MethodCallExt,
impl<M, P> TopElement for MethodCallWrapper<M, P>where
M: MethodCall,
P: MethodCallExt,
Source§const LEN: ElementLength = P::LEN
const LEN: ElementLength = P::LEN
The type of length that prefixes the element’s content and describe
how much space is taken by the element.
Auto Trait Implementations§
impl<M, P> Freeze for MethodCallWrapper<M, P>
impl<M, P> RefUnwindSafe for MethodCallWrapper<M, P>where
M: RefUnwindSafe,
P: RefUnwindSafe,
impl<M, P> Send for MethodCallWrapper<M, P>
impl<M, P> Sync for MethodCallWrapper<M, P>
impl<M, P> Unpin for MethodCallWrapper<M, P>
impl<M, P> UnwindSafe for MethodCallWrapper<M, P>where
M: UnwindSafe,
P: UnwindSafe,
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