pub struct Epoch(pub u32);
Expand description
A number identifying the configuration of the chain (aka the committee).
Tuple Fields§
§0: u32
Implementations§
Source§impl Epoch
impl Epoch
pub fn try_add_one(self) -> Result<Epoch, ArithmeticError>
pub fn try_add_assign_one(&mut self) -> Result<(), ArithmeticError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Epoch
impl<'de> Deserialize<'de> for Epoch
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Epoch, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Epoch, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl InputType for Epoch
impl InputType for Epoch
Source§type RawValueType = Epoch
type RawValueType = Epoch
The raw type used for validator. Read more
Source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
Source§fn parse(value: Option<ConstValue>) -> Result<Epoch, InputValueError<Epoch>>
fn parse(value: Option<ConstValue>) -> Result<Epoch, InputValueError<Epoch>>
Parse from
Value
. None represents undefined.Source§fn to_value(&self) -> ConstValue
fn to_value(&self) -> ConstValue
Convert to a
Value
for introspection.Source§fn as_raw_value(&self) -> Option<&<Epoch as InputType>::RawValueType>
fn as_raw_value(&self) -> Option<&<Epoch as InputType>::RawValueType>
Returns a reference to the raw value.
Source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
Source§impl Ord for Epoch
impl Ord for Epoch
Source§impl OutputType for Epoch
impl OutputType for Epoch
Source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
Source§async fn resolve(
&self,
_: &ContextBase<'_, &Positioned<SelectionSet>>,
_field: &Positioned<Field>,
) -> Result<ConstValue, ServerError>
async fn resolve( &self, _: &ContextBase<'_, &Positioned<SelectionSet>>, _field: &Positioned<Field>, ) -> Result<ConstValue, ServerError>
Resolve an output value to
async_graphql::Value
.Source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
Source§impl PartialOrd for Epoch
impl PartialOrd for Epoch
Source§impl ScalarType for Epoch
impl ScalarType for Epoch
Source§fn parse(value: ConstValue) -> Result<Epoch, InputValueError<Epoch>>
fn parse(value: ConstValue) -> Result<Epoch, InputValueError<Epoch>>
Parse a scalar value.
Source§fn to_value(&self) -> ConstValue
fn to_value(&self) -> ConstValue
Convert the scalar to
Value
.Source§impl Serialize for Epoch
impl Serialize for Epoch
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 Copy for Epoch
impl Eq for Epoch
impl StructuralPartialEq for Epoch
Auto Trait Implementations§
impl Freeze for Epoch
impl RefUnwindSafe for Epoch
impl Send for Epoch
impl Sync for Epoch
impl Unpin for Epoch
impl UnwindSafe for Epoch
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
Source§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
Source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length
bytes from memory from the provided location
.
Source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes
to memory at the provided location
.