Enum hyper_scripter::script::ScriptName
source · [−]pub enum ScriptName {
Anonymous(u32),
Named(ConcreteScriptName),
}
Variants
Anonymous(u32)
Named(ConcreteScriptName)
Implementations
sourceimpl ScriptName
impl ScriptName
pub fn valid(
s: &str,
allow_endwith_slash: bool,
allow_dot: bool,
check: bool
) -> Result<Option<u32>>
pub fn namespaces(&self) -> Vec<&str>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn is_anonymous(&self) -> bool
pub fn key(&self) -> Cow<'_, str>
sourcepub fn to_file_path(&self, ty: &ScriptType) -> Result<PathBuf>
pub fn to_file_path(&self, ty: &ScriptType) -> Result<PathBuf>
回傳值是相對於 HS_HOME 的路徑
sourcepub fn to_file_path_fallback(&self, ty: &ScriptType) -> (PathBuf, Option<Error>)
pub fn to_file_path_fallback(&self, ty: &ScriptType) -> (PathBuf, Option<Error>)
回傳值是相對於 HS_HOME 的路徑,對未知的類別直接用類別名作擴展名
Trait Implementations
sourceimpl Clone for ScriptName
impl Clone for ScriptName
sourcefn clone(&self) -> ScriptName
fn clone(&self) -> ScriptName
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ScriptName
impl Debug for ScriptName
sourceimpl Display for ScriptName
impl Display for ScriptName
sourceimpl FromStr for ScriptName
impl FromStr for ScriptName
type Err = DisplayError
type Err = DisplayError
The associated error which can be returned from parsing.
sourcefn from_str(s: &str) -> DisplayResult<Self>
fn from_str(s: &str) -> DisplayResult<Self>
Parses a string s
to return a value of this type. Read more
sourceimpl Hash for ScriptName
impl Hash for ScriptName
sourceimpl IntoScriptName for ScriptName
impl IntoScriptName for ScriptName
fn into_script_name(self) -> Result<ScriptName>
fn into_script_name_unchecked(self) -> Result<ScriptName> where
Self: Sized,
sourceimpl Ord for ScriptName
impl Ord for ScriptName
sourceimpl PartialEq<ScriptName> for ScriptName
impl PartialEq<ScriptName> for ScriptName
sourcefn eq(&self, other: &ScriptName) -> bool
fn eq(&self, other: &ScriptName) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ScriptName) -> bool
fn ne(&self, other: &ScriptName) -> bool
This method tests for !=
.
sourceimpl PartialOrd<ScriptName> for ScriptName
impl PartialOrd<ScriptName> for ScriptName
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for ScriptName
impl StructuralEq for ScriptName
impl StructuralPartialEq for ScriptName
Auto Trait Implementations
impl RefUnwindSafe for ScriptName
impl Send for ScriptName
impl Sync for ScriptName
impl Unpin for ScriptName
impl UnwindSafe for ScriptName
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.