[−][src]Enum glean_ffi::upload::FfiPingUploadTask
A FFI-compatible representation for the PingUploadTask.
This is exposed as a C-compatible tagged union, like this:
enum FfiPingUploadTask_Tag {
FfiPingUploadTask_Upload,
FfiPingUploadTask_Wait,
FfiPingUploadTask_Done,
};
typedef uint8_t FfiPingUploadTask_Tag;
typedef struct {
FfiPingUploadTask_Tag tag;
char *document_id;
char *path;
char *body;
char *headers;
} FfiPingUploadTask_Upload_Body;
typedef union {
FfiPingUploadTask_Tag tag;
FfiPingUploadTask_Upload_Body upload;
} FfiPingUploadTask;
It is therefore always valid to read the tag
field of the returned union (always the first
field in memory).
Language bindings should turn this into proper language types (e.g. enums/structs) and copy out data.
String fields are encoded into null-terminated UTF-8 C strings.
- The language binding should copy out the data and turn these into their equivalent string type.
- The language binding should not free these fields individually.
Instead
glean_process_ping_upload_response
will receive the whole enum, taking care of freeing the memory.
The order of variants should be the same as in glean-core/src/upload/mod.rs
and glean-core/android/src/main/java/mozilla/telemetry/glean/net/Upload.kt
.
cbindgen:prefix-with-name
Variants
Trait Implementations
impl Drop for FfiPingUploadTask
[src]
impl From<PingUploadTask> for FfiPingUploadTask
[src]
fn from(task: PingUploadTask) -> Self
[src]
impl IntoFfi for FfiPingUploadTask
[src]
type Value = FfiPingUploadTask
This type must be: Read more
fn ffi_default() -> FfiPingUploadTask
[src]
fn into_ffi_value(self) -> FfiPingUploadTask
[src]
Auto Trait Implementations
impl RefUnwindSafe for FfiPingUploadTask
impl !Send for FfiPingUploadTask
impl !Sync for FfiPingUploadTask
impl Unpin for FfiPingUploadTask
impl UnwindSafe for FfiPingUploadTask
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,