[−][src]Struct sync15_traits::bridged_engine::IncomingEnvelope
An envelope for an incoming item, passed to BridgedEngine::store_incoming
.
Envelopes are a halfway point between BSOs, the format used for all items on
the Sync server, and records, which are specific to each engine.
A BSO is a JSON object with metadata fields (id
, modifed
, sortindex
),
and a BSO payload that is itself a JSON string. For encrypted records, the
BSO payload has a ciphertext, which must be decrypted to yield a cleartext.
The cleartext is a JSON string (that's three levels of JSON wrapping, if
you're keeping score: the BSO itself, BSO payload, and cleartext) with the
actual record payload.
An envelope combines the metadata fields from the BSO, and the cleartext from the encrypted BSO payload.
Fields
id: Guid
modified: ServerTimestamp
sortindex: Option<i32>
ttl: Option<u32>
cleartext: String
Implementations
impl IncomingEnvelope
[src]
pub fn payload(&self) -> Result<Payload, PayloadError>
[src]
Parses and returns the record payload from this envelope. Returns an error if the envelope's cleartext isn't valid JSON, or the payload is invalid.
Trait Implementations
impl Clone for IncomingEnvelope
[src]
fn clone(&self) -> IncomingEnvelope
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for IncomingEnvelope
[src]
impl<'de> Deserialize<'de> for IncomingEnvelope
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl RefUnwindSafe for IncomingEnvelope
impl Send for IncomingEnvelope
impl Sync for IncomingEnvelope
impl Unpin for IncomingEnvelope
impl UnwindSafe for IncomingEnvelope
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,