[−][src]Struct exonum_middleware_service::ArtifactReq
A wrapper around an artifact requirement.
Necessary as a separate type because of Rust orphaning rules: we want to use the requirement
as a stub, but the return type (CheckedCall
) is defined in this crate.
Examples
let req: ArtifactReq = "some.Service@^1.3.0".parse().unwrap(); // Suppose the interface for `some.Service` is defined as follows: #[exonum_interface] trait SomeService<Ctx> { type Output; #[interface_method(id = 0)] fn do_something(&self, ctx: Ctx, arg: String) -> Self::Output; } // Then, requirements can be used to perform a checked call to the service. const SERVICE_ID: InstanceId = 100; let checked_call: CheckedCall = req.do_something(SERVICE_ID, "Arg".into());
Trait Implementations
impl Clone for ArtifactReq
[src]
fn clone(&self) -> ArtifactReq
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ArtifactReq
[src]
impl Display for ArtifactReq
[src]
impl From<ArtifactReq> for ArtifactReq
[src]
fn from(value: ArtifactReq) -> Self
[src]
impl From<ArtifactReq> for ArtifactReq
[src]
fn from(value: ArtifactReq) -> Self
[src]
impl FromStr for ArtifactReq
[src]
type Err = <ArtifactReq as FromStr>::Err
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl GenericCall<u32> for ArtifactReq
[src]
type Output = CheckedCall
Type of values output by the stub.
fn generic_call(
&self,
instance_id: InstanceId,
method: MethodDescriptor,
args: Vec<u8>
) -> Self::Output
[src]
&self,
instance_id: InstanceId,
method: MethodDescriptor,
args: Vec<u8>
) -> Self::Output
impl PartialEq<ArtifactReq> for ArtifactReq
[src]
fn eq(&self, other: &ArtifactReq) -> bool
[src]
fn ne(&self, other: &ArtifactReq) -> bool
[src]
impl StructuralPartialEq for ArtifactReq
[src]
Auto Trait Implementations
impl RefUnwindSafe for ArtifactReq
impl Send for ArtifactReq
impl Sync for ArtifactReq
impl Unpin for ArtifactReq
impl UnwindSafe for ArtifactReq
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,