pub struct NegentropyClient { /* private fields */ }Expand description
Serialized, bounded Negentropy initiator.
Implementations§
Source§impl NegentropyClient
impl NegentropyClient
Sourcepub fn new(
items: Vec<NegentropyItem>,
frame_size_limit: u64,
) -> Result<Self, SoftchatError>
pub fn new( items: Vec<NegentropyItem>, frame_size_limit: u64, ) -> Result<Self, SoftchatError>
Build a reconciliation capability from one bounded local event set.
§Errors
Returns a stable redacted error for invalid IDs, timestamps, duplicate IDs, excessive item count, or an out-of-profile frame limit.
Sourcepub fn initiate(&self) -> Result<Vec<u8>, SoftchatError>
pub fn initiate(&self) -> Result<Vec<u8>, SoftchatError>
Create the first binary Negentropy query.
§Errors
Returns a stable redacted error when called more than once.
Sourcepub fn reconcile(
&self,
response: Vec<u8>,
) -> Result<NegentropyStep, SoftchatError>
pub fn reconcile( &self, response: Vec<u8>, ) -> Result<NegentropyStep, SoftchatError>
Process one relay response and advance reconciliation.
§Errors
Returns a stable redacted error before initiation or for any malformed, oversized, out-of-order, or contradictory protocol frame.
Trait Implementations§
Source§impl Debug for NegentropyClient
impl Debug for NegentropyClient
Source§impl<UT> LiftRef<UT> for NegentropyClient
impl<UT> LiftRef<UT> for NegentropyClient
type LiftType = Arc<NegentropyClient>
Source§impl<UT> LowerError<UT> for NegentropyClient
impl<UT> LowerError<UT> for NegentropyClient
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return Read more
Source§impl<UT> LowerReturn<UT> for NegentropyClient
impl<UT> LowerReturn<UT> for NegentropyClient
Source§type ReturnType = <Arc<NegentropyClient> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<NegentropyClient> as LowerReturn<UniFfiTag>>::ReturnType
The type that should be returned by scaffolding functions for this type. Read more
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
Lower the return value from an scaffolding call Read more
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Lower the return value for failed argument lifts Read more
Source§impl<UT> TypeId<UT> for NegentropyClient
impl<UT> TypeId<UT> for NegentropyClient
const TYPE_ID_META: MetadataBuffer
Auto Trait Implementations§
impl !Freeze for NegentropyClient
impl RefUnwindSafe for NegentropyClient
impl Send for NegentropyClient
impl Sync for NegentropyClient
impl Unpin for NegentropyClient
impl UnsafeUnpin for NegentropyClient
impl UnwindSafe for NegentropyClient
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
Mutably borrows from an owned value. Read more
§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
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more