Enum lune::roblox::document::DocumentKind
source · pub enum DocumentKind {
Place,
Model,
}Expand description
A document kind specifier.
Valid variants are the following:
ModelPlace
Other variants are only to be used for logic internal to this crate.
Variants§
Implementations§
source§impl DocumentKind
impl DocumentKind
sourcepub fn from_extension(extension: impl AsRef<str>) -> Option<Self>
pub fn from_extension(extension: impl AsRef<str>) -> Option<Self>
Try to convert a file extension into a valid document kind specifier.
Returns None if the file extension is not a canonical roblox file format extension.
sourcepub fn from_path(path: impl AsRef<Path>) -> Option<Self>
pub fn from_path(path: impl AsRef<Path>) -> Option<Self>
Try to convert a file path into a valid document kind specifier.
Returns None if the file extension of the path
is not a canonical roblox file format extension.
sourcepub fn from_weak_dom(dom: &WeakDom) -> Option<Self>
pub fn from_weak_dom(dom: &WeakDom) -> Option<Self>
Try to detect a document kind specifier from a weak dom.
Returns None if the given dom is empty and as such can not have its kind inferred.
Trait Implementations§
source§impl Clone for DocumentKind
impl Clone for DocumentKind
source§fn clone(&self) -> DocumentKind
fn clone(&self) -> DocumentKind
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 DocumentKind
impl Debug for DocumentKind
source§impl Hash for DocumentKind
impl Hash for DocumentKind
source§impl PartialEq for DocumentKind
impl PartialEq for DocumentKind
source§fn eq(&self, other: &DocumentKind) -> bool
fn eq(&self, other: &DocumentKind) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for DocumentKind
impl Eq for DocumentKind
impl StructuralEq for DocumentKind
impl StructuralPartialEq for DocumentKind
Auto Trait Implementations§
impl RefUnwindSafe for DocumentKind
impl Send for DocumentKind
impl Sync for DocumentKind
impl Unpin for DocumentKind
impl UnwindSafe for DocumentKind
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
source§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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§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.