pub struct LocationQuery {
pub segment: String,
pub segment_index: Option<usize>,
pub field: Option<usize>,
pub repeat: Option<usize>,
pub component: Option<usize>,
pub subcomponent: Option<usize>,
}
Expand description
A location query that describes the location of a value within an HL7 message.
The query is made up of the segment name, field index, repeat index, component index, and
subcomponent index. Each part of the query is separated by a period (.
), and each index is
enclosed in square brackets ([]
). For example, the query PID.5[1].1
would refer to the
first subcomponent of the first component of the first repeat of the fifth field of the PID
segment.
All indexes are 1-based.
Fields§
§segment: String
§segment_index: Option<usize>
§field: Option<usize>
§repeat: Option<usize>
§component: Option<usize>
§subcomponent: Option<usize>
Implementations§
Source§impl LocationQuery
impl LocationQuery
Sourcepub fn parse(query: &str) -> Result<Self, QueryParseError>
pub fn parse(query: &str) -> Result<Self, QueryParseError>
Parse a location query from a string. Equivalent to parse_location_query
.
Trait Implementations§
Source§impl Clone for LocationQuery
impl Clone for LocationQuery
Source§fn clone(&self) -> LocationQuery
fn clone(&self) -> LocationQuery
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 LocationQuery
impl Debug for LocationQuery
Source§impl<'de> Deserialize<'de> for LocationQuery
impl<'de> Deserialize<'de> for LocationQuery
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 Display for LocationQuery
impl Display for LocationQuery
Source§impl FromStr for LocationQuery
impl FromStr for LocationQuery
Source§impl Hash for LocationQuery
impl Hash for LocationQuery
Source§impl PartialEq for LocationQuery
impl PartialEq for LocationQuery
Source§impl Serialize for LocationQuery
impl Serialize for LocationQuery
Source§impl TryFrom<&String> for LocationQuery
impl TryFrom<&String> for LocationQuery
Source§impl TryFrom<&str> for LocationQuery
impl TryFrom<&str> for LocationQuery
Source§impl TryFrom<String> for LocationQuery
impl TryFrom<String> for LocationQuery
impl Eq for LocationQuery
impl StructuralPartialEq for LocationQuery
Auto Trait Implementations§
impl Freeze for LocationQuery
impl RefUnwindSafe for LocationQuery
impl Send for LocationQuery
impl Sync for LocationQuery
impl Unpin for LocationQuery
impl UnwindSafe for LocationQuery
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