Skip to main content

MessageSender

Trait MessageSender 

Source
pub trait MessageSender: Send + Sync {
    // Required method
    fn send(&self, handle: &str, body: &str) -> Result<SendOutcome, String>;
}
Expand description

Synchronous, injectable outbound-send seam. The production impl (RealMessageSender) calls the un-gated car_ffi_common::integrations::messages_send; tests substitute a capturing spy recording (handle, body) so SC-3/SC-5 assert the outbound behavior with no Messages.app.

Required Methods§

Source

fn send(&self, handle: &str, body: &str) -> Result<SendOutcome, String>

Send one iMessage body to handle. Returns:

  • Err(reason) on a HARD failure (the orchestrator logs + rolls back + retries; never panics).
  • Ok(SendOutcome { sent, reason }) otherwise — sent:true for a delivered message, sent:false (with a reason) for a SOFT failure the pre-U3 code swallowed as success.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§