Struct debris_llir::extern_item_path::ExternItemPath
source · pub struct ExternItemPath(String);
Expand description
Represents the path of an extern item, like extern fn This path only supports a very limited set of characters for now.
Tuple Fields§
§0: String
Implementations§
source§impl ExternItemPath
impl ExternItemPath
sourcepub const VALID_CHARACTERS: &'static str = "[a-z0-9_-/]"
pub const VALID_CHARACTERS: &'static str = "[a-z0-9_-/]"
A Regex of valid characters (See Minecraft Wiki) Currently excludes “.” to avoid confusion
pub fn new(path: String) -> Result<Self, ItemPathError>
pub fn verify(path: String) -> Result<String, ItemPathError>
Trait Implementations§
source§impl AsRef<str> for ExternItemPath
impl AsRef<str> for ExternItemPath
source§impl Clone for ExternItemPath
impl Clone for ExternItemPath
source§fn clone(&self) -> ExternItemPath
fn clone(&self) -> ExternItemPath
Returns a copy 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 ExternItemPath
impl Debug for ExternItemPath
source§impl Hash for ExternItemPath
impl Hash for ExternItemPath
source§impl PartialEq for ExternItemPath
impl PartialEq for ExternItemPath
source§fn eq(&self, other: &ExternItemPath) -> bool
fn eq(&self, other: &ExternItemPath) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ExternItemPath
impl StructuralEq for ExternItemPath
impl StructuralPartialEq for ExternItemPath
Auto Trait Implementations§
impl RefUnwindSafe for ExternItemPath
impl Send for ExternItemPath
impl Sync for ExternItemPath
impl Unpin for ExternItemPath
impl UnwindSafe for ExternItemPath
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.