#[repr(i32)]pub enum HookType {
Unspecified = 0,
AfterValidatorCreated = 1,
BeforeValidatorModified = 2,
AfterValidatorRemoved = 3,
AfterValidatorBonded = 4,
AfterValidatorBeginUnbonding = 5,
BeforeDelegationCreated = 6,
BeforeDelegationSharesModified = 7,
BeforeDelegationRemoved = 8,
AfterDelegationModified = 9,
BeforeValidatorSlashed = 10,
AfterUnbondingInitiated = 11,
}
Expand description
Hook types that can be subscribed to.
Variants§
Unspecified = 0
AfterValidatorCreated = 1
Triggered after validator is created
BeforeValidatorModified = 2
Triggered before validator is modified
AfterValidatorRemoved = 3
Triggered after validator is removed
AfterValidatorBonded = 4
Triggered after validator is bonded
AfterValidatorBeginUnbonding = 5
Triggered after validator begins unbonding
BeforeDelegationCreated = 6
Triggered before delegation is created
Triggered before delegation’s shares are modified
BeforeDelegationRemoved = 8
Triggered before delegation is removed
AfterDelegationModified = 9
Triggered after delegation is modified
BeforeValidatorSlashed = 10
Triggered before validator is slashed
AfterUnbondingInitiated = 11
Triggered after unbonding is initiated
Implementations§
Source§impl HookType
impl HookType
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HookType
impl<'de> Deserialize<'de> for HookType
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
Source§impl JsonSchema for HookType
impl JsonSchema for HookType
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl Ord for HookType
impl Ord for HookType
Source§impl PartialOrd for HookType
impl PartialOrd for HookType
impl Copy for HookType
impl Eq for HookType
impl StructuralPartialEq for HookType
Auto Trait Implementations§
impl Freeze for HookType
impl RefUnwindSafe for HookType
impl Send for HookType
impl Sync for HookType
impl Unpin for HookType
impl UnwindSafe for HookType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more