pub struct Contract { /* private fields */ }Implementations§
Source§impl Contract
impl Contract
pub fn new( operation: Definition, version: u32, codec: Codec, schema: Schema, ) -> Result<Contract, ContractError>
pub fn grpc(&self) -> Option<&Grpc>
pub fn with_grpc(self, binding: Option<Grpc>) -> Result<Contract, ContractError>
pub fn operation(&self) -> &Definition
pub fn version(&self) -> u32
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: &Contract) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Contract
impl<'de> Deserialize<'de> for Contract
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Contract, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Contract, <__D as Deserializer<'de>>::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) -> Contract
fn from(descriptor: Descriptor) -> Contract
Converts to this type from the input type.
Source§impl Serialize for Contract
impl Serialize for Contract
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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§
impl<T> Allocation for T
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