pub struct SalesforceApplier<A: Authenticator> { /* private fields */ }Expand description
Minimal Salesforce REST applier for force-sync lanes.
Implementations§
Source§impl<A: Authenticator> SalesforceApplier<A>
impl<A: Authenticator> SalesforceApplier<A>
Sourcepub const fn new(client: ForceClient<A>) -> Self
pub const fn new(client: ForceClient<A>) -> Self
Creates a new applier from an authenticated force client.
Sourcepub async fn apply_rest_upsert(
&self,
sobject: &str,
external_id_field: &str,
external_id_value: &str,
payload: &Value,
) -> Result<RestApplyResult, ApplyError>
pub async fn apply_rest_upsert( &self, sobject: &str, external_id_field: &str, external_id_value: &str, payload: &Value, ) -> Result<RestApplyResult, ApplyError>
Applies an external-ID upsert using the idempotent REST lane.
§Errors
Returns a retryable or permanent apply error if the request fails.
Sourcepub async fn apply_rest_delete(
&self,
sobject: &str,
salesforce_id: &SalesforceId,
) -> Result<(), ApplyError>
pub async fn apply_rest_delete( &self, sobject: &str, salesforce_id: &SalesforceId, ) -> Result<(), ApplyError>
Applies a REST delete using a known Salesforce record ID.
§Errors
Returns a retryable or permanent apply error if the request fails.
Sourcepub async fn apply_bulk_upsert<T>(
&self,
sobject: &str,
external_id_field: &str,
batch_size: usize,
records: Vec<T>,
) -> Result<SmartIngestResult, ApplyError>
pub async fn apply_bulk_upsert<T>( &self, sobject: &str, external_id_field: &str, batch_size: usize, records: Vec<T>, ) -> Result<SmartIngestResult, ApplyError>
Applies a bulk upsert using an external ID field and configured batch size.
§Errors
Returns a retryable or permanent apply error if the bulk job fails.
Trait Implementations§
Source§impl<A: Clone + Authenticator> Clone for SalesforceApplier<A>
impl<A: Clone + Authenticator> Clone for SalesforceApplier<A>
Source§fn clone(&self) -> SalesforceApplier<A>
fn clone(&self) -> SalesforceApplier<A>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<A> Freeze for SalesforceApplier<A>
impl<A> !RefUnwindSafe for SalesforceApplier<A>
impl<A> Send for SalesforceApplier<A>
impl<A> Sync for SalesforceApplier<A>
impl<A> Unpin for SalesforceApplier<A>
impl<A> UnsafeUnpin for SalesforceApplier<A>
impl<A> !UnwindSafe for SalesforceApplier<A>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request