[][src]Struct sync15::BsoRecord

pub struct BsoRecord<T> {
    pub id: Guid,
    pub collection: String,
    pub modified: ServerTimestamp,
    pub sortindex: Option<i32>,
    pub ttl: Option<u32>,
    pub payload: T,
}

Fields

id: Guidcollection: Stringmodified: ServerTimestampsortindex: Option<i32>ttl: Option<u32>payload: T

Implementations

impl<T> BsoRecord<T>[src]

pub fn map_payload<P, F>(self, mapper: F) -> BsoRecord<P> where
    F: FnOnce(T) -> P, 
[src]

pub fn with_payload<P>(self, payload: P) -> BsoRecord<P>[src]

pub fn new_record(id: String, coll: String, payload: T) -> BsoRecord<T>[src]

pub fn try_map_payload<P, E>(
    self,
    mapper: impl FnOnce(T) -> Result<P, E>
) -> Result<BsoRecord<P>, E>
[src]

pub fn map_payload_or<P>(
    self,
    mapper: impl FnOnce(T) -> Option<P>
) -> Option<BsoRecord<P>>
[src]

pub fn into_timestamped_payload(self) -> (T, ServerTimestamp)[src]

impl<T> BsoRecord<Option<T>>[src]

pub fn transpose(self) -> Option<BsoRecord<T>>[src]

Helper to improve ergonomics for handling records that might be tombstones.

impl<T, E> BsoRecord<Result<T, E>>[src]

pub fn transpose(self) -> Result<BsoRecord<T>, E>[src]

impl BsoRecord<Payload>[src]

pub fn from_payload(payload: Payload, collection: impl Into<String>) -> Self[src]

impl BsoRecord<EncryptedPayload>[src]

pub fn decrypt(self, key: &KeyBundle) -> Result<CleartextBso>[src]

pub fn decrypt_as<T>(self, key: &KeyBundle) -> Result<BsoRecord<T>> where
    T: Deserialize<'a>, 
[src]

impl BsoRecord<Payload>[src]

pub fn encrypt(self, key: &KeyBundle) -> Result<EncryptedBso>[src]

pub fn into_record<T>(self) -> Result<BsoRecord<T>> where
    T: Deserialize<'a>, 
[src]

Trait Implementations

impl<T: Clone> Clone for BsoRecord<T>[src]

impl<T: Debug> Debug for BsoRecord<T>[src]

impl<T> Deref for BsoRecord<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T> DerefMut for BsoRecord<T>[src]

impl<'de, T> Deserialize<'de> for BsoRecord<T> where
    T: DeserializeOwned
[src]

impl<T: PartialEq> PartialEq<BsoRecord<T>> for BsoRecord<T>[src]

impl<T> Serialize for BsoRecord<T> where
    T: Serialize
[src]

impl<T> StructuralPartialEq for BsoRecord<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for BsoRecord<T> where
    T: RefUnwindSafe

impl<T> Send for BsoRecord<T> where
    T: Send

impl<T> Sync for BsoRecord<T> where
    T: Sync

impl<T> Unpin for BsoRecord<T> where
    T: Unpin

impl<T> UnwindSafe for BsoRecord<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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