pub struct OutgoingBso {
pub envelope: OutgoingEnvelope,
pub payload: String,
}
Fields§
§envelope: OutgoingEnvelope
§payload: String
Implementations§
source§impl OutgoingBso
impl OutgoingBso
pub fn into_encrypted(self, key: &KeyBundle) -> Result<OutgoingEncryptedBso>
source§impl OutgoingBso
impl OutgoingBso
sourcepub fn new_tombstone(envelope: OutgoingEnvelope) -> Self
pub fn new_tombstone(envelope: OutgoingEnvelope) -> Self
Creates a new tombstone record. Not all collections expect tombstones.
sourcepub fn from_content_with_id<T>(record: T) -> Result<Self, Error>where
T: Serialize,
pub fn from_content_with_id<T>(record: T) -> Result<Self, Error>where
T: Serialize,
Creates a outgoing record from some id
. This is the most convenient way to create an outgoing
item from a id
in the json.
sourcepub fn from_content<T>(
envelope: OutgoingEnvelope,
record: T,
) -> Result<Self, Error>where
T: Serialize,
pub fn from_content<T>(
envelope: OutgoingEnvelope,
record: T,
) -> Result<Self, Error>where
T: Serialize,
Create an Outgoing record with an explicit envelope. Will panic if the payload has an ID but it doesn’t match the envelope.
source§impl OutgoingBso
impl OutgoingBso
Tests often want an IncomingBso to test, and the easiest way is often to create an OutgoingBso convert it back to an incoming.
sourcepub fn to_test_incoming(&self) -> IncomingBso
pub fn to_test_incoming(&self) -> IncomingBso
When a test has an OutgoingBso and wants it as an IncomingBso
sourcepub fn to_test_incoming_ts(&self, ts: ServerTimestamp) -> IncomingBso
pub fn to_test_incoming_ts(&self, ts: ServerTimestamp) -> IncomingBso
When a test has an OutgoingBso and wants it as an IncomingBso with a specific timestamp.
sourcepub fn to_test_incoming_t<T: for<'de> Deserialize<'de>>(&self) -> T
pub fn to_test_incoming_t<T: for<'de> Deserialize<'de>>(&self) -> T
When a test has an OutgoingBso and wants it as an IncomingBso with a specific T.
source§impl OutgoingBso
impl OutgoingBso
Trait Implementations§
source§impl Debug for OutgoingBso
impl Debug for OutgoingBso
Auto Trait Implementations§
impl Freeze for OutgoingBso
impl RefUnwindSafe for OutgoingBso
impl Send for OutgoingBso
impl Sync for OutgoingBso
impl Unpin for OutgoingBso
impl UnwindSafe for OutgoingBso
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<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