pub struct DelegationConditions {
pub kind: Option<EventKind>,
pub created_after: Option<Unixtime>,
pub created_before: Option<Unixtime>,
pub full_string: Option<String>,
}
Expand description
Conditions of delegation
Fields§
§kind: Option<EventKind>
If the delegation is only for a given event kind
created_after: Option<Unixtime>
If the delegation is only for events created after a certain time
created_before: Option<Unixtime>
If the delegation is only for events created before a certain time
full_string: Option<String>
Optional full string form, in case it was parsed from string
Implementations§
source§impl DelegationConditions
impl DelegationConditions
sourcepub fn as_string(&self) -> String
pub fn as_string(&self) -> String
Return in conmpiled string form. If full form is stored, it is returned, otherwise it is compiled from parts.
sourcepub fn try_from_str(s: &str) -> Result<DelegationConditions, Error>
pub fn try_from_str(s: &str) -> Result<DelegationConditions, Error>
Convert from string from
Trait Implementations§
source§impl Clone for DelegationConditions
impl Clone for DelegationConditions
source§fn clone(&self) -> DelegationConditions
fn clone(&self) -> DelegationConditions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DelegationConditions
impl Debug for DelegationConditions
source§impl Default for DelegationConditions
impl Default for DelegationConditions
source§fn default() -> DelegationConditions
fn default() -> DelegationConditions
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for DelegationConditions
impl<'de> Deserialize<'de> for DelegationConditions
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 PartialEq for DelegationConditions
impl PartialEq for DelegationConditions
source§impl<'a_, C_: Context> Readable<'a_, C_> for DelegationConditions
impl<'a_, C_: Context> Readable<'a_, C_> for DelegationConditions
fn read_from<R_: Reader<'a_, C_>>(_reader_: &mut R_) -> Result<Self, C_::Error>
fn minimum_bytes_needed() -> usize
fn read_from_buffer_with_ctx( context: C, buffer: &'a [u8], ) -> Result<Self, <C as Context>::Error>
fn read_with_length_from_buffer_with_ctx( context: C, buffer: &'a [u8], ) -> (Result<Self, <C as Context>::Error>, usize)
fn read_from_buffer_copying_data_with_ctx( context: C, buffer: &[u8], ) -> Result<Self, <C as Context>::Error>
fn read_with_length_from_buffer_copying_data_with_ctx( context: C, buffer: &[u8], ) -> (Result<Self, <C as Context>::Error>, usize)
fn read_with_length_from_buffer_copying_data_with_ctx_mut( context: &mut C, buffer: &[u8], ) -> (Result<Self, <C as Context>::Error>, usize)
fn read_from_stream_unbuffered_with_ctx<S>(
context: C,
stream: S,
) -> Result<Self, <C as Context>::Error>where
S: Read,
fn read_from_stream_buffered_with_ctx<S>(
context: C,
stream: S,
) -> Result<Self, <C as Context>::Error>where
S: Read,
fn read_from_file_with_ctx( context: C, path: impl AsRef<Path>, ) -> Result<Self, <C as Context>::Error>
source§impl Serialize for DelegationConditions
impl Serialize for DelegationConditions
source§impl<C_: Context> Writable<C_> for DelegationConditions
impl<C_: Context> Writable<C_> for DelegationConditions
fn write_to<T_: ?Sized + Writer<C_>>( &self, _writer_: &mut T_, ) -> Result<(), C_::Error>
fn write_to_buffer_with_ctx( &self, context: C, buffer: &mut [u8], ) -> Result<(), <C as Context>::Error>
fn write_to_buffer_with_ctx_mut( &self, context: &mut C, buffer: &mut [u8], ) -> Result<(), <C as Context>::Error>
fn write_to_vec_with_ctx( &self, context: C, ) -> Result<Vec<u8>, <C as Context>::Error>
fn write_to_vec_with_ctx_mut( &self, context: &mut C, ) -> Result<Vec<u8>, <C as Context>::Error>
fn write_to_stream_with_ctx<S>(
&self,
context: C,
stream: S,
) -> Result<(), <C as Context>::Error>where
S: Write,
fn write_to_file_with_ctx( &self, context: C, path: impl AsRef<Path>, ) -> Result<(), <C as Context>::Error>
fn bytes_needed(&self) -> Result<usize, <C as Context>::Error>
impl Eq for DelegationConditions
impl StructuralPartialEq for DelegationConditions
Auto Trait Implementations§
impl Freeze for DelegationConditions
impl RefUnwindSafe for DelegationConditions
impl Send for DelegationConditions
impl Sync for DelegationConditions
impl Unpin for DelegationConditions
impl UnwindSafe for DelegationConditions
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)