Struct core::event_request::EventRequest
[−]pub struct EventRequest {
pub request: EventRequestType,
pub timestamp: i64,
pub signature: Signature,
pub approvals: HashSet<ApprovalResponse, RandomState>,
}
Expand description
Request that originated the event. It contains basically the proposed change and the votes obtained related to it.
Fields
request: EventRequestType
timestamp: i64
signature: Signature
approvals: HashSet<ApprovalResponse, RandomState>
Implementations
impl EventRequest
impl EventRequest
pub fn check_against_schema(
&self,
schema: &Value,
subject: &Subject
) -> Result<(), SubjectError>
pub fn check_signatures(&self) -> Result<(), CryptoErrorEvent>
pub fn create_subject_from_request(
self,
governance_version: u64,
subject_schema: &Value,
approved: bool
) -> Result<(Subject, Event), SubjectError>
pub fn get_event_from_state_request(
self,
subject: &Subject,
prev_event_hash: DigestIdentifier,
governance_version: u64,
subject_schema: &Value,
approved: bool
) -> Result<Event, SubjectError>
Trait Implementations
impl BorshDeserialize for EventRequestwhere
EventRequestType: BorshDeserialize,
i64: BorshDeserialize,
Signature: BorshDeserialize,
HashSet<ApprovalResponse, RandomState>: BorshDeserialize,
impl BorshDeserialize for EventRequestwhere
EventRequestType: BorshDeserialize,
i64: BorshDeserialize,
Signature: BorshDeserialize,
HashSet<ApprovalResponse, RandomState>: BorshDeserialize,
fn deserialize(buf: &mut &[u8]) -> Result<EventRequest, Error>
fn deserialize(buf: &mut &[u8]) -> Result<EventRequest, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes. Read more
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
impl BorshSerialize for EventRequestwhere
EventRequestType: BorshSerialize,
i64: BorshSerialize,
Signature: BorshSerialize,
HashSet<ApprovalResponse, RandomState>: BorshSerialize,
impl BorshSerialize for EventRequestwhere
EventRequestType: BorshSerialize,
i64: BorshSerialize,
Signature: BorshSerialize,
HashSet<ApprovalResponse, RandomState>: BorshSerialize,
impl Clone for EventRequest
impl Clone for EventRequest
fn clone(&self) -> EventRequest
fn clone(&self) -> EventRequest
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 moreimpl Debug for EventRequest
impl Debug for EventRequest
impl<'de> Deserialize<'de> for EventRequest
impl<'de> Deserialize<'de> for EventRequest
fn deserialize<__D>(
__deserializer: __D
) -> Result<EventRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<EventRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl PartialEq<EventRequest> for EventRequest
impl PartialEq<EventRequest> for EventRequest
fn eq(&self, other: &EventRequest) -> bool
fn eq(&self, other: &EventRequest) -> bool
impl Serialize for EventRequest
impl Serialize for EventRequest
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 ToSchema for EventRequest
impl ToSchema for EventRequest
impl Eq for EventRequest
impl StructuralEq for EventRequest
impl StructuralPartialEq for EventRequest
Auto Trait Implementations
impl RefUnwindSafe for EventRequest
impl Send for EventRequest
impl Sync for EventRequest
impl Unpin for EventRequest
impl UnwindSafe for EventRequest
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.