Struct primitives::campaign::validators::Validators
source · pub struct Validators(_, _);
Expand description
Unordered list of the validators representing the leader & follower
Implementations
sourceimpl Validators
impl Validators
pub fn new(validators: (ValidatorDesc, ValidatorDesc)) -> Self
pub fn find(&self, validator_id: &ValidatorId) -> Option<&ValidatorDesc>
pub fn iter(&self) -> Iter<'_> ⓘ
Trait Implementations
sourceimpl Clone for Validators
impl Clone for Validators
sourcefn clone(&self) -> Validators
fn clone(&self) -> Validators
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for Validators
impl Debug for Validators
sourceimpl<'de> Deserialize<'de> for Validators
impl<'de> Deserialize<'de> for Validators
sourcefn 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
sourceimpl From<(ValidatorDesc, ValidatorDesc)> for Validators
impl From<(ValidatorDesc, ValidatorDesc)> for Validators
sourcefn from(validators: (ValidatorDesc, ValidatorDesc)) -> Self
fn from(validators: (ValidatorDesc, ValidatorDesc)) -> Self
Converts to this type from the input type.
sourceimpl<'a> FromSql<'a> for Validators
impl<'a> FromSql<'a> for Validators
sourcefn from_sql(
ty: &Type,
raw: &'a [u8]
) -> Result<Self, Box<dyn Error + Sync + Send>>
fn from_sql(
ty: &Type,
raw: &'a [u8]
) -> Result<Self, Box<dyn Error + Sync + Send>>
Creates a new value of this type from a buffer of data of the specified
Postgres
Type
in its binary format. Read moresourcefn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be created from the specified
Postgres
Type
. Read moresourceimpl Index<usize> for Validators
impl Index<usize> for Validators
sourceimpl<'a> IntoIterator for &'a Validators
impl<'a> IntoIterator for &'a Validators
Fixed size iterator of 2, as we need an iterator in couple of occasions
sourceimpl PartialEq<Validators> for Validators
impl PartialEq<Validators> for Validators
sourcefn eq(&self, other: &Validators) -> bool
fn eq(&self, other: &Validators) -> bool
sourceimpl Serialize for Validators
impl Serialize for Validators
sourceimpl ToSql for Validators
impl ToSql for Validators
sourcefn to_sql(
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql(
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
Converts the value of
self
into the binary format of the specified
Postgres Type
, appending it to out
. Read moresourcefn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be converted to the specified
Postgres
Type
. Read moresourcefn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
An adaptor method used internally by Rust-Postgres. Read more
sourcefn encode_format(&self, _ty: &Type) -> Format
fn encode_format(&self, _ty: &Type) -> Format
Specify the encode format
impl Eq for Validators
impl StructuralEq for Validators
impl StructuralPartialEq for Validators
Auto Trait Implementations
impl RefUnwindSafe for Validators
impl Send for Validators
impl Sync for Validators
impl Unpin for Validators
impl UnwindSafe for Validators
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> BorrowToSql for Twhere
T: ToSql,
impl<T> BorrowToSql for Twhere
T: ToSql,
sourcefn borrow_to_sql(&self) -> &dyn ToSql
fn borrow_to_sql(&self) -> &dyn ToSql
Returns a reference to
self
as a ToSql
trait object.