pub trait PropertyAccess {
Show 18 methods
// Required method
fn new() -> Self;
// Provided methods
fn set_property(&mut self, _property_name: String, _property: Property) { ... }
fn get_char(&self, _property_name: &String) -> Option<i8> { ... }
fn get_uchar(&self, _property_name: &String) -> Option<u8> { ... }
fn get_short(&self, _property_name: &String) -> Option<i16> { ... }
fn get_ushort(&self, _property_name: &String) -> Option<u16> { ... }
fn get_int(&self, _property_name: &String) -> Option<i32> { ... }
fn get_uint(&self, _property_name: &String) -> Option<u32> { ... }
fn get_float(&self, _property_name: &String) -> Option<f32> { ... }
fn get_double(&self, _property_name: &String) -> Option<f64> { ... }
fn get_list_char(&self, _property_name: &String) -> Option<&[i8]> { ... }
fn get_list_uchar(&self, _property_name: &String) -> Option<&[u8]> { ... }
fn get_list_short(&self, _property_name: &String) -> Option<&[i16]> { ... }
fn get_list_ushort(&self, _property_name: &String) -> Option<&[u16]> { ... }
fn get_list_int(&self, _property_name: &String) -> Option<&[i32]> { ... }
fn get_list_uint(&self, _property_name: &String) -> Option<&[u32]> { ... }
fn get_list_float(&self, _property_name: &String) -> Option<&[f32]> { ... }
fn get_list_double(&self, _property_name: &String) -> Option<&[f64]> { ... }
}
Expand description
Provides setters and getters for the Parser and the Writer.
This trait allows you to create your own data structure for the case that the default HashMap isn’t efficient enough for you.
All setters and getters have default implementations that do nothing or at most return None
.
Feel free only to implement what your application actually uses: If you know, that you only expect unsigned shorts, don’t bother about implementing signed shorts or floats, it won’t be called.
The getters are named in congruence with PropertyType
and ScalarType
.
Required Methods§
Provided Methods§
fn set_property(&mut self, _property_name: String, _property: Property)
fn get_char(&self, _property_name: &String) -> Option<i8>
fn get_uchar(&self, _property_name: &String) -> Option<u8>
fn get_short(&self, _property_name: &String) -> Option<i16>
fn get_ushort(&self, _property_name: &String) -> Option<u16>
fn get_int(&self, _property_name: &String) -> Option<i32>
fn get_uint(&self, _property_name: &String) -> Option<u32>
fn get_float(&self, _property_name: &String) -> Option<f32>
fn get_double(&self, _property_name: &String) -> Option<f64>
fn get_list_char(&self, _property_name: &String) -> Option<&[i8]>
fn get_list_uchar(&self, _property_name: &String) -> Option<&[u8]>
fn get_list_short(&self, _property_name: &String) -> Option<&[i16]>
fn get_list_ushort(&self, _property_name: &String) -> Option<&[u16]>
fn get_list_int(&self, _property_name: &String) -> Option<&[i32]>
fn get_list_uint(&self, _property_name: &String) -> Option<&[u32]>
fn get_list_float(&self, _property_name: &String) -> Option<&[f32]>
fn get_list_double(&self, _property_name: &String) -> Option<&[f64]>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.