pub struct Contract { /* private fields */ }Implementations§
Source§impl Contract
impl Contract
pub fn new( operation: OperationDefinition, fingerprint: Fingerprint, codec: Codec, schema: Schema, ) -> Result<Self, ContractError>
pub fn new_with_settings( operation: OperationDefinition, fingerprint: Fingerprint, codec: Codec, schema: Schema, settings: &SchemaSettings, ) -> Result<Self, ContractError>
pub fn grpc(&self) -> Option<&Grpc>
pub fn with_grpc(self, binding: Option<Grpc>) -> Result<Self, ContractError>
pub fn operation(&self) -> &OperationDefinition
pub fn fingerprint(&self) -> Fingerprint
pub fn codec(&self) -> Codec
pub fn schema(&self) -> &Schema
pub fn request(&self) -> View<'_>
pub fn response(&self) -> View<'_>
pub fn input(&self) -> Option<View<'_>>
pub fn output(&self) -> Option<View<'_>>
pub fn compatible(&self, requirement: &Self) -> bool
pub fn compatible_with_settings( &self, requirement: &Self, settings: &SchemaSettings, ) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Contract
impl<'de> Deserialize<'de> for Contract
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Contract
Source§impl From<Descriptor> for Contract
impl From<Descriptor> for Contract
Source§fn from(descriptor: Descriptor) -> Self
fn from(descriptor: Descriptor) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Contract
Auto Trait Implementations§
impl Freeze for Contract
impl RefUnwindSafe for Contract
impl Send for Contract
impl Sync for Contract
impl Unpin for Contract
impl UnsafeUnpin for Contract
impl UnwindSafe for Contract
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