[−][src]Struct exonum::runtime::InstanceSpec
Exhaustive service instance specification.
Fields (Non-exhaustive)
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.id: InstanceId
Unique numeric ID of the service instance.
Exonum assigns an ID to the service on instantiation. It is mainly used to route transaction messages belonging to this instance.
name: String
Unique name of the service instance.
The name serves as a primary identifier of this service in most operations. It is assigned by the network administrators.
The name must correspond to the following regular expression: [a-zA-Z0-9/\:-_]+
.
artifact: ArtifactId
Identifier of the corresponding artifact.
Methods
impl InstanceSpec
[src]
pub fn new(
id: InstanceId,
name: impl Into<String>,
artifact: impl AsRef<str>
) -> Result<Self>
[src]
id: InstanceId,
name: impl Into<String>,
artifact: impl AsRef<str>
) -> Result<Self>
Creates a new instance specification or return an error if the resulting specification is not correct.
pub fn from_raw_parts(
id: InstanceId,
name: String,
artifact: ArtifactId
) -> Self
[src]
id: InstanceId,
name: String,
artifact: ArtifactId
) -> Self
Creates a new instance specification from prepared parts without any checks.
pub fn is_valid_name(name: impl AsRef<str>) -> Result<()>
[src]
Checks that the instance name contains only allowed characters and is not empty.
pub fn as_descriptor(&self) -> InstanceDescriptor
[src]
Returns the corresponding descriptor of this instance specification.
Trait Implementations
impl BinaryValue for InstanceSpec
[src]
fn to_bytes(&self) -> Vec<u8>
[src]
fn from_bytes(value: Cow<[u8]>) -> Result<Self, Error>
[src]
fn into_bytes(self) -> Vec<u8>
[src]
impl Clone for InstanceSpec
[src]
fn clone(&self) -> InstanceSpec
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for InstanceSpec
[src]
impl<'de> Deserialize<'de> for InstanceSpec
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for InstanceSpec
[src]
impl Eq for InstanceSpec
[src]
impl From<InstanceSpec> for InstanceInitParams
[src]
fn from(instance_spec: InstanceSpec) -> Self
[src]
impl Hash for InstanceSpec
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl ObjectHash for InstanceSpec
[src]
fn object_hash(&self) -> Hash
[src]
impl PartialEq<InstanceSpec> for InstanceSpec
[src]
fn eq(&self, other: &InstanceSpec) -> bool
[src]
fn ne(&self, other: &InstanceSpec) -> bool
[src]
impl ProtobufConvert for InstanceSpec
[src]
type ProtoStruct = InstanceSpec
Type generated from the Protobuf definition.
fn from_pb(pb: Self::ProtoStruct) -> Result<Self, Error>
[src]
fn to_pb(&self) -> Self::ProtoStruct
[src]
impl Serialize for InstanceSpec
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for InstanceSpec
[src]
impl StructuralPartialEq for InstanceSpec
[src]
impl ValidateInput for InstanceSpec
[src]
Auto Trait Implementations
impl RefUnwindSafe for InstanceSpec
impl Send for InstanceSpec
impl Sync for InstanceSpec
impl Unpin for InstanceSpec
impl UnwindSafe for InstanceSpec
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> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
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>,