Xuanwo commented on code in PR #2461:
URL:
https://github.com/apache/incubator-opendal/pull/2461#discussion_r1228974699
##########
core/src/types/operator/builder.rs:
##########
@@ -355,6 +355,28 @@ impl<A: Accessor> OperatorBuilder<A> {
}
}
+ /// Enable the strict mode for the built Operator.
+ ///
+ /// In strict mode, Operator will return error when the given
+ /// operation arguments contain options that are unsupported by
+ /// the service. By default (without calling this method), all
+ /// unsupported options are ignored silently.
+ ///
+ /// # Notes
+ ///
+ /// `OperatorBuilder::with_strict()` uses static dispatch which
+ /// is zero cost. `Operator::with_strict()` uses dynamic dispatch
+ /// which has a bit runtime overhead with an extra vtable lookup
+ /// and unable to inline.
+ ///
+ /// It's always recommended to use `OperatorBuilder::with_strict()`.
+ #[must_use]
+ pub fn with_strict(
Review Comment:
Yes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]