/// Enqueues a reject `Response` for the provided `msg` (iff it is a
/// `Request`) onto the provided `stream`, with the given reject code
/// and error message.
///
/// The VSR generates `Accept` signals for all messages, but if the message
/// cannot be inducted (e.g. because the canister is not found or the queue
/// is full) Message Routing generates a reject `Response` and enqueues it
/// directly onto the reverse stream.


The VSR generates `Accept` signals for all messages, but if the message
cannot be inducted  Message Routing generates a reject `Response` and enqueues it
directly onto the reverse stream.
The VSR generates ` Accept ` signals for all messages but if the message cannot be inducted Message Routing generates a reject ` Response ` and enqueues it directly onto the reverse stream .
fn try_enqueue_reject_response(
        &self,
        msg: RequestOrResponse,
        reject_code: RejectCode,
        reject_message: String,
        stream: &mut StreamHandle,
    ) {
        match msg {
            RequestOrResponse::Request(_) => {
                let context = RejectContext::new(reject_code, reject_message);
                stream.push(generate_reject_response(msg, context))
            }
            RequestOrResponse::Response(_) => {}
        }
    }
fn try_enqueue_reject_response ( & self , msg : RequestOrResponse , reject_code : RejectCode , reject_message : String , stream : & mut StreamHandle , ) { match msg { RequestOrResponse :: Request ( _ ) => { let context = RejectContext :: new ( reject_code , reject_message ) ; stream . push ( generate_reject_response ( msg , context ) ) } RequestOrResponse :: Response ( _ ) => { } } }
Enqueues a reject `Response` for the provided `msg` (iff it is a
`Request`) onto the provided `stream`, with the given reject code
and error message.
Enqueues a reject ` Response ` for the provided ` msg ` ( iff it is a ` Request ` ) onto the provided ` stream ` with the given reject code and error message .
&self
msg
RequestOrResponse
reject_code
RejectCode
reject_message
String
stream
&mut StreamHandle