pub struct EndpointContracts { /* private fields */ }Expand description
Request and response contracts attached to one endpoint.
Implementations§
Source§impl EndpointContracts
impl EndpointContracts
Sourcepub fn add_request(&mut self, contract: RequestContract)
pub fn add_request(&mut self, contract: RequestContract)
Adds or replaces the contract for one request location.
Sourcepub fn add_response(&mut self, contract: ResponseContract)
pub fn add_response(&mut self, contract: ResponseContract)
Adds or replaces the response contract for one status code.
Sourcepub fn requests(&self) -> &[RequestContract]
pub fn requests(&self) -> &[RequestContract]
Returns request contract references in registration order.
Sourcepub fn responses(&self) -> &[ResponseContract]
pub fn responses(&self) -> &[ResponseContract]
Returns response contract references in registration order.
Trait Implementations§
Source§impl Clone for EndpointContracts
impl Clone for EndpointContracts
Source§fn clone(&self) -> EndpointContracts
fn clone(&self) -> EndpointContracts
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EndpointContracts
impl Debug for EndpointContracts
Source§impl Default for EndpointContracts
impl Default for EndpointContracts
Source§fn default() -> EndpointContracts
fn default() -> EndpointContracts
Returns the “default value” for a type. Read more
impl Eq for EndpointContracts
Source§impl PartialEq for EndpointContracts
impl PartialEq for EndpointContracts
impl StructuralPartialEq for EndpointContracts
Auto Trait Implementations§
impl Freeze for EndpointContracts
impl RefUnwindSafe for EndpointContracts
impl Send for EndpointContracts
impl Sync for EndpointContracts
impl Unpin for EndpointContracts
impl UnsafeUnpin for EndpointContracts
impl UnwindSafe for EndpointContracts
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