pub enum FfiError {
Auth {
code: Option<String>,
detail: String,
},
Upload {
code: Option<String>,
detail: String,
},
Sync {
code: Option<String>,
detail: String,
},
Workspace {
detail: String,
},
Label {
refusal: FfiLabelRefusal,
detail: String,
},
Trash {
refusal: FfiTrashRefusal,
code: Option<String>,
retention_until: Option<String>,
detail: String,
},
Escrow {
code: Option<String>,
detail: String,
},
Directory {
code: Option<String>,
detail: String,
},
Fetch {
code: Option<String>,
detail: String,
},
InvalidArgument {
detail: String,
},
}Expand description
Every failure the FFI flows can surface, flattened by originating layer. Each
variant carries the stable error.* catalog code (when one applies — clients
localize it) and the English detail (stays English), mirroring the
SDK’s { error, code } contract so foreign apps switch on the code, never a
bare HTTP status.
Variants§
Auth
An authentication flow (login/register/refresh/logout) failed.
Fields
Upload
An upload flow (create/transfer/status) failed.
Fields
Sync
A sync flow (pull/reconcile) failed.
Fields
Workspace
A local workspace operation failed — opening the library, sealing an asset, reading a
managed asset. This is the workspace failing, never an entry being refused: a refused
sync entry is a FfiSyncApplyOutcome::Quarantined verdict, not an error.
Label
A label or region edit was refused before anything was written: its target does not
exist, the label rule refused the label, or the shape broke the normalized-coordinate
contract. refusal says which, so an editor shows the reason rather than parsing
detail.
Fields
refusal: FfiLabelRefusalWhy the edit was refused.
Trash
A trash verb (delete, restore, purge) was refused before anything was written: the asset
is unknown, not in the trash, or past its signed retention window. refusal says which.
Fields
refusal: FfiTrashRefusalWhy the verb was refused.
code: Option<String>Stable error.* catalog code, when one applies: error.upload.retention_elapsed
for FfiTrashRefusal::RetentionElapsed, the code the server answers the same
refusal with.
Escrow
A master-key escrow flow (store/fetch) failed.
Fields
Directory
A device-directory flow (publish/fetch) failed.
Fields
Fetch
A blob fetch (FfiSession::fetch_blob_to_path) failed: the blob is gone, still
awaiting its original, refused, did not hash to its content address, or could not be
written locally. Nothing is left at the destination path.
Fields
InvalidArgument
A foreign argument was structurally invalid (e.g. an un-parseable URL) before any network call.
Trait Implementations§
Source§impl<UT> ConvertError<UT> for FfiError
impl<UT> ConvertError<UT> for FfiError
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
Source§impl Error for FfiError
impl Error for FfiError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl<UT> FfiConverter<UT> for FfiError
impl<UT> FfiConverter<UT> for FfiError
Source§const TYPE_ID_META: MetadataBuffer
const TYPE_ID_META: MetadataBuffer
Source§type FfiType = RustBuffer
type FfiType = RustBuffer
Source§fn lower(v: Self) -> RustBuffer
fn lower(v: Self) -> RustBuffer
Source§fn try_lift(buf: RustBuffer) -> Result<Self>
fn try_lift(buf: RustBuffer) -> Result<Self>
Source§impl From<DirectoryError> for FfiError
impl From<DirectoryError> for FfiError
Source§fn from(err: DirectoryError) -> Self
fn from(err: DirectoryError) -> Self
Source§impl From<FetchError> for FfiError
impl From<FetchError> for FfiError
Source§fn from(err: FetchError) -> Self
fn from(err: FetchError) -> Self
Source§impl From<HistoryError> for FfiError
impl From<HistoryError> for FfiError
Source§fn from(err: HistoryError) -> Self
fn from(err: HistoryError) -> Self
Source§impl From<LifecycleError> for FfiError
impl From<LifecycleError> for FfiError
Source§fn from(err: LifecycleError) -> Self
fn from(err: LifecycleError) -> Self
Source§impl From<RecoveryError> for FfiError
impl From<RecoveryError> for FfiError
Source§fn from(err: RecoveryError) -> Self
fn from(err: RecoveryError) -> Self
Source§impl From<UploadError> for FfiError
impl From<UploadError> for FfiError
Source§fn from(err: UploadError) -> Self
fn from(err: UploadError) -> Self
Source§impl<UT> LiftReturn<UT> for FfiError
impl<UT> LiftReturn<UT> for FfiError
Source§type ReturnType = <FfiError as Lift<UT>>::FfiType
type ReturnType = <FfiError as Lift<UT>>::FfiType
Source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
Source§impl<UT> LowerError<UT> for FfiError
impl<UT> LowerError<UT> for FfiError
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for FfiError
impl<UT> LowerReturn<UT> for FfiError
Source§type ReturnType = <FfiError as Lower<UT>>::FfiType
type ReturnType = <FfiError as Lower<UT>>::FfiType
Source§fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
§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 FfiError
impl RefUnwindSafe for FfiError
impl Send for FfiError
impl Sync for FfiError
impl Unpin for FfiError
impl UnsafeUnpin for FfiError
impl UnwindSafe for FfiError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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