Struct rdftk_core::qname::QName [−][src]
pub struct QName { /* fields omitted */ }
Expand description
QNames are valid identifiers with an optional prefix identifier. e.g. “xsd:integer
”,
“rdfs:Class
”, “:subPropertyOf
”.
Implementations
impl QName
[src]
impl QName
[src]pub fn new(name: &str) -> Result<Self, RdfError>
[src]
pub fn new(name: &str) -> Result<Self, RdfError>
[src]Construct a new unqualified QName: “:{name}
”. This will return an error if either
the name is empty or is an invalid QName part.
pub fn new_unchecked(prefix: Option<&str>, name: &str) -> Self
[src]
pub fn new_unchecked(prefix: Option<&str>, name: &str) -> Self
[src]Construct a new QName without any validation checks on the given values.
pub fn with_prefix(prefix: &str, name: &str) -> Result<Self, RdfError>
[src]
pub fn with_prefix(prefix: &str, name: &str) -> Result<Self, RdfError>
[src]Construct a new qualified QName: “{prefix}:{name}
”. This will return an error if either
the prefix or name is empty or is an invalid QName part.
pub fn has_prefix(&self) -> bool
[src]
pub fn has_prefix(&self) -> bool
[src]Returns true
if this QName has a prefix, else false
.
Trait Implementations
impl Eq for QName
[src]
impl StructuralEq for QName
[src]
impl StructuralPartialEq for QName
[src]
Auto Trait Implementations
impl RefUnwindSafe for QName
impl Send for QName
impl Sync for QName
impl Unpin for QName
impl UnwindSafe for QName
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more