pub struct Prefix<T: Borrow<str>>(/* private fields */);
Expand description
See Prefix::new
.
Implementations§
Source§impl<T: Borrow<str>> Prefix<T>
impl<T: Borrow<str>> Prefix<T>
Sourcepub fn new(prefix: T) -> Result<Self, InvalidPrefix>
pub fn new(prefix: T) -> Result<Self, InvalidPrefix>
This wrapper guarantees that the underlying str
satisfies the PN_PREFIX?
rule in Turtle/SPARQL.
Sourcepub fn new_unchecked(inner: T) -> Self
pub fn new_unchecked(inner: T) -> Self
Construct a Prefix<T>
without checking that the inner value is valid. If it is not, it may result in undefined behaviour.
Trait Implementations§
Source§impl<'a, T: Borrow<str> + Deserialize<'a>> Deserialize<'a> for Prefix<T>
impl<'a, T: Borrow<str> + Deserialize<'a>> Deserialize<'a> for Prefix<T>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> Ord for Prefix<T>
impl<T> Ord for Prefix<T>
Source§impl<T, U> PartialOrd<Prefix<T>> for Prefix<U>
impl<T, U> PartialOrd<Prefix<T>> for Prefix<U>
Source§impl<T> PartialOrd<Prefix<T>> for str
impl<T> PartialOrd<Prefix<T>> for str
Source§impl<T> PartialOrd<str> for Prefix<T>
impl<T> PartialOrd<str> for Prefix<T>
impl<T: Copy + Borrow<str>> Copy for Prefix<T>
impl<T> Eq for Prefix<T>
impl<T: Borrow<str>> IsPrefix for Prefix<T>
Auto Trait Implementations§
impl<T> Freeze for Prefix<T>where
T: Freeze,
impl<T> RefUnwindSafe for Prefix<T>where
T: RefUnwindSafe,
impl<T> Send for Prefix<T>where
T: Send,
impl<T> Sync for Prefix<T>where
T: Sync,
impl<T> Unpin for Prefix<T>where
T: Unpin,
impl<T> UnwindSafe for Prefix<T>where
T: UnwindSafe,
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