pub struct SignedEntityConfig {
pub allowed_discriminants: BTreeSet<SignedEntityTypeDiscriminants>,
pub cardano_transactions_signing_config: CardanoTransactionsSigningConfig,
}
Expand description
Convert TimePoint to SignedEntityType and list allowed signed entity types and discriminants.
Fields§
§allowed_discriminants: BTreeSet<SignedEntityTypeDiscriminants>
List of discriminants that the node is allowed to sign
cardano_transactions_signing_config: CardanoTransactionsSigningConfig
Cardano transactions signing configuration
Implementations§
source§impl SignedEntityConfig
impl SignedEntityConfig
sourcepub const DEFAULT_ALLOWED_DISCRIMINANTS: [SignedEntityTypeDiscriminants; 2] = _
pub const DEFAULT_ALLOWED_DISCRIMINANTS: [SignedEntityTypeDiscriminants; 2] = _
Default allowed discriminants
Appended to the allowed discriminants in the configuration.
sourcepub fn append_allowed_signed_entity_types_discriminants(
discriminants: BTreeSet<SignedEntityTypeDiscriminants>,
) -> BTreeSet<SignedEntityTypeDiscriminants>
pub fn append_allowed_signed_entity_types_discriminants( discriminants: BTreeSet<SignedEntityTypeDiscriminants>, ) -> BTreeSet<SignedEntityTypeDiscriminants>
Append to the given list of allowed signed entity types discriminants the Self::DEFAULT_ALLOWED_DISCRIMINANTS if not already present.
sourcepub fn list_allowed_signed_entity_types_discriminants(
&self,
) -> BTreeSet<SignedEntityTypeDiscriminants>
pub fn list_allowed_signed_entity_types_discriminants( &self, ) -> BTreeSet<SignedEntityTypeDiscriminants>
Create the deduplicated list of allowed signed entity types discriminants.
The list is the aggregation of Self::DEFAULT_ALLOWED_DISCRIMINANTS and
allowed_discriminants
.
sourcepub fn time_point_to_signed_entity<D: Into<SignedEntityTypeDiscriminants>>(
&self,
discriminant: D,
time_point: &TimePoint,
) -> StdResult<SignedEntityType>
pub fn time_point_to_signed_entity<D: Into<SignedEntityTypeDiscriminants>>( &self, discriminant: D, time_point: &TimePoint, ) -> StdResult<SignedEntityType>
Convert this time point to a signed entity type based on the given discriminant.
sourcepub fn list_allowed_signed_entity_types(
&self,
time_point: &TimePoint,
) -> StdResult<Vec<SignedEntityType>>
pub fn list_allowed_signed_entity_types( &self, time_point: &TimePoint, ) -> StdResult<Vec<SignedEntityType>>
Create the deduplicated list of allowed signed entity types discriminants.
The list is the aggregation of Self::DEFAULT_ALLOWED_DISCRIMINANTS and
allowed_discriminants
.
Trait Implementations§
source§impl Clone for SignedEntityConfig
impl Clone for SignedEntityConfig
source§fn clone(&self) -> SignedEntityConfig
fn clone(&self) -> SignedEntityConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SignedEntityConfig
impl Debug for SignedEntityConfig
source§impl PartialEq for SignedEntityConfig
impl PartialEq for SignedEntityConfig
impl Eq for SignedEntityConfig
impl StructuralPartialEq for SignedEntityConfig
Auto Trait Implementations§
impl Freeze for SignedEntityConfig
impl RefUnwindSafe for SignedEntityConfig
impl Send for SignedEntityConfig
impl Sync for SignedEntityConfig
impl Unpin for SignedEntityConfig
impl UnwindSafe for SignedEntityConfig
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
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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