pub struct FirestoreFieldTransform {
pub field: String,
pub transform_type: FirestoreFieldTransformType,
}
Expand description
Represents a transformation to apply to a specific field within a document.
Field transformations allow for atomic, server-side modifications of document fields, such as incrementing a number, setting a field to the server’s timestamp, or manipulating array elements.
Fields§
§field: String
The dot-separated path to the field to transform (e.g., “user.profile.age”).
transform_type: FirestoreFieldTransformType
The type of transformation to apply.
Implementations§
Source§impl FirestoreFieldTransform
impl FirestoreFieldTransform
pub fn new(field: String, transform_type: FirestoreFieldTransformType) -> Self
pub fn field(&mut self, value: String) -> &mut Self
pub fn with_field(self, value: String) -> Self
pub fn transform_type( &mut self, value: FirestoreFieldTransformType, ) -> &mut Self
pub fn with_transform_type(self, value: FirestoreFieldTransformType) -> Self
Trait Implementations§
Source§impl Clone for FirestoreFieldTransform
impl Clone for FirestoreFieldTransform
Source§fn clone(&self) -> FirestoreFieldTransform
fn clone(&self) -> FirestoreFieldTransform
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 moreSource§impl Debug for FirestoreFieldTransform
impl Debug for FirestoreFieldTransform
Source§impl FirestoreTransformExpr for FirestoreFieldTransform
impl FirestoreTransformExpr for FirestoreFieldTransform
Source§fn build_transform(self) -> Option<FirestoreFieldTransform>
fn build_transform(self) -> Option<FirestoreFieldTransform>
Builds the
FirestoreFieldTransform
.
Returns None
if the expression represents an empty or no-op transform.Source§impl From<FirestoreFieldTransformInit> for FirestoreFieldTransform
impl From<FirestoreFieldTransformInit> for FirestoreFieldTransform
Source§fn from(value: FirestoreFieldTransformInit) -> Self
fn from(value: FirestoreFieldTransformInit) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FirestoreFieldTransform
impl PartialEq for FirestoreFieldTransform
Source§impl TryInto<FieldTransform> for FirestoreFieldTransform
impl TryInto<FieldTransform> for FirestoreFieldTransform
Source§type Error = FirestoreError
type Error = FirestoreError
The type returned in the event of a conversion error.
impl StructuralPartialEq for FirestoreFieldTransform
Auto Trait Implementations§
impl Freeze for FirestoreFieldTransform
impl RefUnwindSafe for FirestoreFieldTransform
impl Send for FirestoreFieldTransform
impl Sync for FirestoreFieldTransform
impl Unpin for FirestoreFieldTransform
impl UnwindSafe for FirestoreFieldTransform
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