pub struct MatchingCreate {
pub context: MatchingContext,
pub target: SubjectRef,
pub group: Vec<SubjectRef>,
pub webhook: Option<WebhookEndpoint>,
pub idempotency_key: Option<String>,
pub request_id: Option<String>,
}Expand description
Request payload for MatchingResource::create.
Fields§
§context: MatchingContextMatching context to evaluate.
target: SubjectRefSubject being evaluated.
group: Vec<SubjectRef>Comparison group. Must contain at least one subject.
webhook: Option<WebhookEndpoint>Optional completion webhook destination.
idempotency_key: Option<String>Optional idempotency key applied to the create request.
request_id: Option<String>Optional request identifier echoed by the API.
Implementations§
Source§impl MatchingCreate
impl MatchingCreate
Sourcepub fn new(
context: MatchingContext,
target: SubjectRef,
group: Vec<SubjectRef>,
) -> Self
pub fn new( context: MatchingContext, target: SubjectRef, group: Vec<SubjectRef>, ) -> Self
Creates a new matching request.
Sourcepub fn webhook(self, webhook: WebhookEndpoint) -> Self
pub fn webhook(self, webhook: WebhookEndpoint) -> Self
Attaches a completion webhook to the request.
Sourcepub fn idempotency_key(self, value: impl Into<String>) -> Self
pub fn idempotency_key(self, value: impl Into<String>) -> Self
Sets a caller-supplied idempotency key.
Sourcepub fn request_id(self, value: impl Into<String>) -> Self
pub fn request_id(self, value: impl Into<String>) -> Self
Sets a caller-supplied request identifier.
Trait Implementations§
Source§impl Clone for MatchingCreate
impl Clone for MatchingCreate
Source§fn clone(&self) -> MatchingCreate
fn clone(&self) -> MatchingCreate
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 Freeze for MatchingCreate
impl RefUnwindSafe for MatchingCreate
impl Send for MatchingCreate
impl Sync for MatchingCreate
impl Unpin for MatchingCreate
impl UnsafeUnpin for MatchingCreate
impl UnwindSafe for MatchingCreate
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