Skip to main content

AppAction

Enum AppAction 

Source
pub enum AppAction {
Show 57 variants CreateAccount { name: String, }, UpdateProfileMetadata { name: String, picture_url: Option<String>, }, RestoreSession { owner_nsec: String, }, RestoreAccountBundle { owner_nsec: Option<String>, owner_pubkey_hex: String, device_nsec: String, }, StartLinkedDevice { owner_input: String, }, AppForegrounded, Logout, CreateChat { peer_input: String, }, CreateGroup { name: String, member_inputs: Vec<String>, }, CreateGroupWithPicture { name: String, member_inputs: Vec<String>, picture_file_path: String, picture_filename: String, }, CreatePublicInvite, AcceptInvite { invite_input: String, }, OpenChat { chat_id: String, }, SendMessage { chat_id: String, text: String, }, SendDisappearingMessage { chat_id: String, text: String, expires_at_secs: u64, }, SetChatMessageTtl { chat_id: String, ttl_seconds: Option<u64>, }, SetChatMuted { chat_id: String, muted: bool, }, SendAttachment { chat_id: String, file_path: String, filename: String, caption: String, }, SendAttachments { chat_id: String, attachments: Vec<OutgoingAttachment>, caption: String, }, ToggleReaction { chat_id: String, message_id: String, emoji: String, }, SendTyping { chat_id: String, }, StopTyping { chat_id: String, }, SetTypingIndicatorsEnabled { enabled: bool, }, SetReadReceiptsEnabled { enabled: bool, }, SetDesktopNotificationsEnabled { enabled: bool, }, SetInviteAcceptanceNotificationsEnabled { enabled: bool, }, SetStartupAtLoginEnabled { enabled: bool, }, SetNearbyBluetoothEnabled { enabled: bool, }, SetNearbyLanEnabled { enabled: bool, }, AddNostrRelay { relay_url: String, }, UpdateNostrRelay { old_relay_url: String, new_relay_url: String, }, RemoveNostrRelay { relay_url: String, }, SetNostrRelays { relay_urls: Vec<String>, }, ResetNostrRelays, SetImageProxyEnabled { enabled: bool, }, SetImageProxyUrl { url: String, }, SetImageProxyKeyHex { key_hex: String, }, SetImageProxySaltHex { salt_hex: String, }, ResetImageProxySettings, SetMobilePushServerUrl { url: String, }, ResetMobilePushServerUrl, IngestMobilePushPayload { payload_json: String, }, MarkMessagesSeen { chat_id: String, message_ids: Vec<String>, }, SendReceipt { chat_id: String, receipt_type: String, message_ids: Vec<String>, }, DeleteLocalMessage { chat_id: String, message_id: String, }, DeleteChat { chat_id: String, }, UpdateGroupName { group_id: String, name: String, }, UpdateGroupPicture { group_id: String, file_path: String, filename: String, }, AddGroupMembers { group_id: String, member_inputs: Vec<String>, }, SetGroupAdmin { group_id: String, owner_pubkey_hex: String, is_admin: bool, }, RemoveGroupMember { group_id: String, owner_pubkey_hex: String, }, UploadProfilePicture { file_path: String, }, AddAuthorizedDevice { device_input: String, }, RemoveAuthorizedDevice { device_pubkey_hex: String, }, AcknowledgeRevokedDevice, PushScreen { screen: Screen, }, UpdateScreenStack { stack: Vec<Screen>, },
}

Variants§

§

CreateAccount

Fields

§name: String
§

UpdateProfileMetadata

Fields

§name: String
§picture_url: Option<String>
§

RestoreSession

Fields

§owner_nsec: String
§

RestoreAccountBundle

Fields

§owner_nsec: Option<String>
§owner_pubkey_hex: String
§device_nsec: String
§

StartLinkedDevice

Fields

§owner_input: String
§

AppForegrounded

§

Logout

§

CreateChat

Fields

§peer_input: String
§

CreateGroup

Fields

§name: String
§member_inputs: Vec<String>
§

CreateGroupWithPicture

Fields

§name: String
§member_inputs: Vec<String>
§picture_file_path: String
§picture_filename: String
§

CreatePublicInvite

§

AcceptInvite

Fields

§invite_input: String
§

OpenChat

Fields

§chat_id: String
§

SendMessage

Fields

§chat_id: String
§text: String
§

SendDisappearingMessage

Fields

§chat_id: String
§text: String
§expires_at_secs: u64
§

SetChatMessageTtl

Fields

§chat_id: String
§ttl_seconds: Option<u64>
§

SetChatMuted

Fields

§chat_id: String
§muted: bool
§

SendAttachment

Fields

§chat_id: String
§file_path: String
§filename: String
§caption: String
§

SendAttachments

Fields

§chat_id: String
§caption: String
§

ToggleReaction

Fields

§chat_id: String
§message_id: String
§emoji: String
§

SendTyping

Fields

§chat_id: String
§

StopTyping

Fields

§chat_id: String
§

SetTypingIndicatorsEnabled

Fields

§enabled: bool
§

SetReadReceiptsEnabled

Fields

§enabled: bool
§

SetDesktopNotificationsEnabled

Fields

§enabled: bool
§

SetInviteAcceptanceNotificationsEnabled

Fields

§enabled: bool
§

SetStartupAtLoginEnabled

Fields

§enabled: bool
§

SetNearbyBluetoothEnabled

Fields

§enabled: bool
§

SetNearbyLanEnabled

Fields

§enabled: bool
§

AddNostrRelay

Fields

§relay_url: String
§

UpdateNostrRelay

Fields

§old_relay_url: String
§new_relay_url: String
§

RemoveNostrRelay

Fields

§relay_url: String
§

SetNostrRelays

Fields

§relay_urls: Vec<String>
§

ResetNostrRelays

§

SetImageProxyEnabled

Fields

§enabled: bool
§

SetImageProxyUrl

Fields

§

SetImageProxyKeyHex

Fields

§key_hex: String
§

SetImageProxySaltHex

Fields

§salt_hex: String
§

ResetImageProxySettings

§

SetMobilePushServerUrl

Fields

§

ResetMobilePushServerUrl

§

IngestMobilePushPayload

Fields

§payload_json: String
§

MarkMessagesSeen

Fields

§chat_id: String
§message_ids: Vec<String>
§

SendReceipt

Fields

§chat_id: String
§receipt_type: String
§message_ids: Vec<String>
§

DeleteLocalMessage

Fields

§chat_id: String
§message_id: String
§

DeleteChat

Fields

§chat_id: String
§

UpdateGroupName

Fields

§group_id: String
§name: String
§

UpdateGroupPicture

Fields

§group_id: String
§file_path: String
§filename: String
§

AddGroupMembers

Fields

§group_id: String
§member_inputs: Vec<String>
§

SetGroupAdmin

Fields

§group_id: String
§owner_pubkey_hex: String
§is_admin: bool
§

RemoveGroupMember

Fields

§group_id: String
§owner_pubkey_hex: String
§

UploadProfilePicture

Fields

§file_path: String
§

AddAuthorizedDevice

Fields

§device_input: String
§

RemoveAuthorizedDevice

Fields

§device_pubkey_hex: String
§

AcknowledgeRevokedDevice

§

PushScreen

Fields

§screen: Screen
§

UpdateScreenStack

Fields

§stack: Vec<Screen>

Trait Implementations§

Source§

impl Clone for AppAction

Source§

fn clone(&self) -> AppAction

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<UT> ConvertError<UT> for AppAction

Source§

impl Debug for AppAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<UT> FfiConverter<UT> for AppAction

Source§

const TYPE_ID_META: MetadataBuffer

Type ID metadata, serialized into a MetadataBuffer.
Source§

type FfiType = RustBuffer

The low-level type used for passing values of this type over the FFI. Read more
Source§

fn lower(v: Self) -> RustBuffer

Lower a rust value of the target type, into an FFI value of type Self::FfiType. Read more
Source§

fn try_lift(buf: RustBuffer) -> Result<Self>

Lift a rust value of the target type, from an FFI value of type Self::FfiType. Read more
Source§

fn write(obj: Self, buf: &mut Vec<u8>)

Write a rust value into a buffer, to send over the FFI in serialized form. Read more
Source§

fn try_read(buf: &mut &[u8]) -> Result<Self>

Read a rust value from a buffer, received over the FFI in serialized form. Read more
Source§

impl<UT> Lift<UT> for AppAction

Source§

type FfiType = <AppAction as FfiConverter<UT>>::FfiType

Source§

fn try_lift(v: Self::FfiType) -> Result<Self>

Source§

fn try_read(buf: &mut &[u8]) -> Result<Self>

Source§

fn try_lift_from_rust_buffer(v: RustBuffer) -> Result<Self, Error>

Convenience method
Source§

impl<UT> LiftRef<UT> for AppAction

Source§

impl<UT> LiftReturn<UT> for AppAction

Source§

type ReturnType = <AppAction as Lift<UT>>::FfiType

FFI return type for trait interfaces
Source§

fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>

Lift a successfully returned value from a trait interface
Source§

fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self

Lift a foreign returned value from a trait interface Read more
Source§

fn lift_error(_buf: RustBuffer) -> Self

Lift a Rust value for a callback interface method error result Read more
Source§

fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self

Lift a Rust value for an unexpected callback interface error Read more
Source§

impl<UT> Lower<UT> for AppAction

Source§

type FfiType = <AppAction as FfiConverter<UT>>::FfiType

Source§

fn lower(obj: Self) -> Self::FfiType

Source§

fn write(obj: Self, buf: &mut Vec<u8>)

Source§

fn lower_into_rust_buffer(obj: Self) -> RustBuffer

Convenience method
Source§

impl<UT> LowerError<UT> for AppAction

Source§

fn lower_error(obj: Self) -> RustBuffer

Lower this value for scaffolding function return Read more
Source§

impl<UT> LowerReturn<UT> for AppAction

Source§

type ReturnType = <AppAction as Lower<UT>>::FfiType

The type that should be returned by scaffolding functions for this type. Read more
Source§

fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>

Lower the return value from an scaffolding call Read more
Source§

fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>

Lower the return value for failed argument lifts Read more
Source§

impl<UT> TypeId<UT> for AppAction

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, UT> HandleAlloc<UT> for T
where T: Send + Sync,

Source§

fn new_handle(value: Arc<T>) -> Handle

Create a new handle for an Arc value Read more
Source§

unsafe fn clone_handle(handle: Handle) -> Handle

Clone a handle Read more
Source§

unsafe fn consume_handle(handle: Handle) -> Arc<T>

Consume a handle, getting back the initial Arc<> Read more
Source§

unsafe fn get_arc(handle: Handle) -> Arc<Self>

Get a clone of the Arc<> using a “borrowed” handle. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more