pub struct FfiApp { /* private fields */ }Implementations§
Source§impl FfiApp
impl FfiApp
pub fn new( data_dir: String, _keychain_group: String, _app_version: String, ) -> Arc<Self> ⓘ
pub fn state(&self) -> AppState
pub fn dispatch(&self, action: AppAction)
Sourcepub fn perf_counters(&self) -> FfiPerfCountersSnapshot
pub fn perf_counters(&self) -> FfiPerfCountersSnapshot
Snapshot of the per-FFI-method call counts since FfiApp was
created. Used by tests/perf_budgets.rs to assert that hot
shell paths stay within their expected FFI traffic. Reading
is best-effort Relaxed — call counts are advisory not
transactional.
Sourcepub fn core_perf_counters(&self) -> CorePerfCountersSnapshot
pub fn core_perf_counters(&self) -> CorePerfCountersSnapshot
Snapshot of core-internal hot-loop counters. Used by
tests/perf_budgets.rs to budget work that happens entirely
inside the core thread — the FFI surface counters above can’t
see those. Default snapshot on timeout so a wedged core can’t
pin the test on a perpetual wait.
Sourcepub fn search(
&self,
query: String,
scope_chat_id: Option<String>,
limit: u32,
) -> SearchResultSnapshot
pub fn search( &self, query: String, scope_chat_id: Option<String>, limit: u32, ) -> SearchResultSnapshot
Grouped Signal-style search: filters the in-memory chat list
into contacts/groups by display name + subtitle + chat id, and
runs the SQLite FTS5 index for the messages section. Optional
scope_chat_id restricts message hits to a single thread (the
“search in this chat” pill in the desktop sidebar). Returns an
empty snapshot for empty / whitespace queries.
Sourcepub fn chat_snapshot(
&self,
chat_id: String,
limit: u32,
) -> Option<CurrentChatSnapshot>
pub fn chat_snapshot( &self, chat_id: String, limit: u32, ) -> Option<CurrentChatSnapshot>
Bounded chat projection for a route-selected chat. Unlike
OpenChat, this is a direct read from the shared state/SQLite
handle and never waits behind the core action queue. Shells use
it as the first paint for chat screens; the core still receives
OpenChat for unread clearing, subscriptions, and side effects.
pub fn chat_snapshot_before( &self, chat_id: String, before_message_id: String, limit: u32, ) -> Option<CurrentChatSnapshot>
pub fn chat_snapshot_around_message( &self, chat_id: String, message_id: String, before_limit: u32, after_limit: u32, ) -> Option<CurrentChatSnapshot>
pub fn ingest_nearby_event_json(&self, event_json: String) -> bool
pub fn ingest_nearby_event_json_with_transport( &self, event_json: String, transport: String, ) -> bool
pub fn build_nearby_presence_event_json( &self, peer_id: String, my_nonce: String, their_nonce: String, profile_event_id: String, ) -> String
pub fn verify_nearby_presence_event_json( &self, event_json: String, peer_id: String, my_nonce: String, their_nonce: String, ) -> String
pub fn nearby_encode_frame(&self, envelope_json: String) -> Vec<u8> ⓘ
pub fn nearby_decode_frame(&self, frame: Vec<u8>) -> String
pub fn nearby_frame_body_len_from_header(&self, header: Vec<u8>) -> i32
pub fn export_support_bundle_json(&self) -> String
pub fn peer_profile_debug( &self, owner_input: String, ) -> Option<PeerProfileDebugSnapshot>
pub fn mutual_groups(&self, owner_input: String) -> MutualGroupsSnapshot
pub fn prepare_for_suspend(&self)
pub fn shutdown(&self)
pub fn listen_for_updates(&self, reconciler: Box<dyn AppReconciler>)
Trait Implementations§
Source§impl<UT> LowerError<UT> for FfiApp
impl<UT> LowerError<UT> for FfiApp
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for FfiApp
impl<UT> LowerReturn<UT> for FfiApp
Source§type ReturnType = <Arc<FfiApp> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<FfiApp> as LowerReturn<UniFfiTag>>::ReturnType
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
Source§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Auto Trait Implementations§
impl !Freeze for FfiApp
impl RefUnwindSafe for FfiApp
impl Send for FfiApp
impl Sync for FfiApp
impl Unpin for FfiApp
impl UnsafeUnpin for FfiApp
impl UnwindSafe for FfiApp
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
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more