pub struct OracleFeed {
pub name: Option<String>,
pub jobs: Vec<OracleJob>,
pub min_oracle_samples: Option<u32>,
pub min_job_responses: Option<u32>,
pub max_job_range_pct: Option<u64>,
}
Expand description
/ Represents a complete feed schema to be performed by a Switchboard oracle.
Fields§
§name: Option<String>
§jobs: Vec<OracleJob>
/ A list of jobs to be performed by the oracle.
min_oracle_samples: Option<u32>
/ The number of oracles to sample before returning a result.
min_job_responses: Option<u32>
/ The minimum number of jobs required to succeed in order to produce a result.
max_job_range_pct: Option<u64>
/ Maximum allowed percentage deviation between job responses.
Implementations§
Source§impl OracleFeed
impl OracleFeed
Sourcepub fn min_oracle_samples(&self) -> u32
pub fn min_oracle_samples(&self) -> u32
Returns the value of min_oracle_samples
, or the default value if min_oracle_samples
is unset.
Sourcepub fn min_job_responses(&self) -> u32
pub fn min_job_responses(&self) -> u32
Returns the value of min_job_responses
, or the default value if min_job_responses
is unset.
Sourcepub fn max_job_range_pct(&self) -> u64
pub fn max_job_range_pct(&self) -> u64
Returns the value of max_job_range_pct
, or the default value if max_job_range_pct
is unset.
Trait Implementations§
Source§impl Clone for OracleFeed
impl Clone for OracleFeed
Source§fn clone(&self) -> OracleFeed
fn clone(&self) -> OracleFeed
Returns a duplicate 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 OracleFeed
impl Debug for OracleFeed
Source§impl Default for OracleFeed
impl Default for OracleFeed
§impl<'de> Deserialize<'de> for OracleFeed
impl<'de> Deserialize<'de> for OracleFeed
§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 Message for OracleFeed
impl Message for OracleFeed
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.Source§impl PartialEq for OracleFeed
impl PartialEq for OracleFeed
§impl Serialize for OracleFeed
impl Serialize for OracleFeed
impl StructuralPartialEq for OracleFeed
Auto Trait Implementations§
impl Freeze for OracleFeed
impl RefUnwindSafe for OracleFeed
impl Send for OracleFeed
impl Sync for OracleFeed
impl Unpin for OracleFeed
impl UnwindSafe for OracleFeed
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