pub struct Dictionary(/* private fields */);Expand description
For storage and retrieval of key/value pairs.
Implementations§
Source§impl Dictionary
impl Dictionary
Sourcepub fn with_name(name: &str) -> Result<Self, QuickFixError>
pub fn with_name(name: &str) -> Result<Self, QuickFixError>
Try to create new empty struct with a given name.
Sourcepub fn contains(&self, key: &str) -> Result<bool, QuickFixError>
pub fn contains(&self, key: &str) -> Result<bool, QuickFixError>
Check if dictionary contains key.
Sourcepub fn get<T>(&self, key: &str) -> Result<T, QuickFixError>where
Self: ForeignPropertyGetter<T>,
pub fn get<T>(&self, key: &str) -> Result<T, QuickFixError>where
Self: ForeignPropertyGetter<T>,
Read value from dictionary for a given key.
Sourcepub fn set<T>(&mut self, key: &str, value: T) -> Result<(), QuickFixError>where
Self: ForeignPropertySetter<T>,
pub fn set<T>(&mut self, key: &str, value: T) -> Result<(), QuickFixError>where
Self: ForeignPropertySetter<T>,
Write value into dictionary for a given key.
Source§impl Dictionary
impl Dictionary
Sourcepub fn try_from_items(
items: &[&dyn DictionaryItem],
) -> Result<Self, QuickFixError>
pub fn try_from_items( items: &[&dyn DictionaryItem], ) -> Result<Self, QuickFixError>
Build dictionary parameters from multiple items.
Examples found in repository?
examples/demo_config.rs (lines 25-29)
20fn build_settings() -> Result<SessionSettings, QuickFixError> {
21 let mut settings = SessionSettings::new();
22
23 settings.set(
24 None,
25 Dictionary::try_from_items(&[
26 &ConnectionType::Acceptor,
27 &ReconnectInterval(60),
28 &FileStorePath("store"),
29 ])?,
30 )?;
31
32 settings.set(
33 Some(&SessionId::try_new("FIX.4.4", "ME", "THEIR", "")?),
34 Dictionary::try_from_items(&[
35 &StartTime("12:30:00"),
36 &EndTime("23:30:00"),
37 &HeartBtInt(20),
38 &SocketAcceptPort(4000),
39 &DataDictionary("quickfix-ffi/libquickfix/spec/FIX41.xml"),
40 ])?,
41 )?;
42
43 Ok(settings)
44}Trait Implementations§
Source§impl Debug for Dictionary
impl Debug for Dictionary
Source§impl Default for Dictionary
impl Default for Dictionary
Source§impl Drop for Dictionary
impl Drop for Dictionary
Source§impl ForeignPropertyGetter<DayOfWeek> for Dictionary
impl ForeignPropertyGetter<DayOfWeek> for Dictionary
Source§impl ForeignPropertyGetter<String> for Dictionary
impl ForeignPropertyGetter<String> for Dictionary
Source§impl ForeignPropertyGetter<bool> for Dictionary
impl ForeignPropertyGetter<bool> for Dictionary
Source§impl ForeignPropertyGetter<f64> for Dictionary
impl ForeignPropertyGetter<f64> for Dictionary
Source§impl ForeignPropertyGetter<i32> for Dictionary
impl ForeignPropertyGetter<i32> for Dictionary
Source§impl ForeignPropertySetter<&str> for Dictionary
impl ForeignPropertySetter<&str> for Dictionary
Source§impl ForeignPropertySetter<DayOfWeek> for Dictionary
impl ForeignPropertySetter<DayOfWeek> for Dictionary
Source§impl ForeignPropertySetter<String> for Dictionary
impl ForeignPropertySetter<String> for Dictionary
Source§impl ForeignPropertySetter<bool> for Dictionary
impl ForeignPropertySetter<bool> for Dictionary
Source§impl ForeignPropertySetter<f64> for Dictionary
impl ForeignPropertySetter<f64> for Dictionary
Source§impl ForeignPropertySetter<i32> for Dictionary
impl ForeignPropertySetter<i32> for Dictionary
Auto Trait Implementations§
impl Freeze for Dictionary
impl RefUnwindSafe for Dictionary
impl !Send for Dictionary
impl !Sync for Dictionary
impl Unpin for Dictionary
impl UnwindSafe for Dictionary
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