pub enum Frame {
Call {
id: u64,
method: String,
params: FramePayload,
},
Cancel {
id: u64,
},
Push {
method: String,
params: FramePayload,
},
Answer {
id: u64,
result: FramePayload,
},
Refusal {
id: u64,
refusal: Refusal,
},
}Variants§
Implementations§
Source§impl Frame
impl Frame
pub const REGISTER: &'static str = "harmos.register"
pub const EXITING: &'static str = "harmos.exiting"
pub const LIMIT: usize
pub const OVERSIZED: i64 = -32_603
Sourcepub fn request_encoded_len<O: OperationDeclaration>(
request: &O::Request,
) -> usize
pub fn request_encoded_len<O: OperationDeclaration>( request: &O::Request, ) -> usize
Bounds a routed Prepare or child call with no portable context values. Uses maximal identifiers and includes a generation context for the child. Frame lengths exclude the four-byte physical packet prefix.
Sourcepub fn request_payload_encoded_len(operation: &str, payload: usize) -> usize
pub fn request_payload_encoded_len(operation: &str, payload: usize) -> usize
Bounds a routed Prepare or empty-values child carrying this encoded payload. Use child_payload_encoded_len when the child carries portable values.
Sourcepub fn child_payload_encoded_len(
operation: &str,
generation: u64,
payload: usize,
generation_context: bool,
values: &[CallValue],
) -> usize
pub fn child_payload_encoded_len( operation: &str, generation: u64, payload: usize, generation_context: bool, values: &[CallValue], ) -> usize
Bounds a child call using its actual portable values and generation presence. Only the unknown outer identifier is bounded by its maximal encoded width.
Sourcepub fn request_fits<O: OperationDeclaration>(request: &O::Request) -> bool
pub fn request_fits<O: OperationDeclaration>(request: &O::Request) -> bool
Tests the routed Prepare or empty-values child bound; not an arbitrary child context.
pub fn reply_encoded_len<O: OperationDeclaration>(reply: &O::Response) -> usize
pub fn reply_fits<O: OperationDeclaration>(reply: &O::Response) -> bool
pub fn encoded_len(&self) -> usize
pub fn fits(&self) -> bool
pub fn exiting_reason(params: &[u8]) -> Option<String>
pub async fn diagnostic<R>(input: &mut R) -> Result<Option<String>>
Trait Implementations§
impl Eq for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
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