pub struct Namespace(/* private fields */);Implementations§
Source§impl Namespace
impl Namespace
pub fn new_top_level_from_segment( segment: NamespaceSegment, ) -> Result<Namespace, NamespaceError>
pub fn try_new_top_level<S: Into<String>>( segment: S, ) -> Result<Namespace, NamespaceError>
pub fn try_append_segment( &self, segment: NamespaceSegment, ) -> Result<Self, NamespaceError>
pub fn try_append<S: Into<String>>( self, segment: S, ) -> Result<Self, NamespaceError>
pub fn parent(&self) -> Option<Namespace>
pub fn get_segments(&self) -> Vec<NamespaceSegment>
pub fn last_segment(&self) -> Option<NamespaceSegment>
pub fn is_path(&self) -> bool
pub fn is_type(&self) -> bool
pub fn relative_url(&self) -> String
pub fn relative_path(&self) -> PathBuf
Sourcepub fn fully_qualified_type_name(&self) -> String
pub fn fully_qualified_type_name(&self) -> String
Returns the fully qualified type name in pascal case. For example, namespace1::namespace2::namespace3::TypeName will become Namespace1Namespace2Namespace3TypeName
pub fn parse_optional_namespace(
namespace: Option<String>,
) -> Result<Option<Self>, NamespaceError>where
Self: Sized,
Trait Implementations§
Source§impl AsRef<Namespace> for ComponentTypeId
impl AsRef<Namespace> for ComponentTypeId
Source§impl AsRef<Namespace> for EntityTypeId
impl AsRef<Namespace> for EntityTypeId
Source§impl AsRef<Namespace> for ExtensionTypeId
impl AsRef<Namespace> for ExtensionTypeId
Source§impl AsRef<Namespace> for FlowTypeId
impl AsRef<Namespace> for FlowTypeId
Source§impl AsRef<Namespace> for NamespacedType
impl AsRef<Namespace> for NamespacedType
Source§impl AsRef<Namespace> for RelationInstanceTypeId
impl AsRef<Namespace> for RelationInstanceTypeId
Source§impl AsRef<Namespace> for RelationTypeId
impl AsRef<Namespace> for RelationTypeId
Source§impl<'de> Deserialize<'de> for Namespace
impl<'de> Deserialize<'de> for Namespace
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromIterator<Namespace> for Namespaces
impl FromIterator<Namespace> for Namespaces
Source§impl JsonSchema for Namespace
impl JsonSchema for Namespace
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for Namespace
impl Ord for Namespace
Source§impl PartialOrd for Namespace
impl PartialOrd for Namespace
Source§impl TryFrom<NamespaceSegment> for Namespace
impl TryFrom<NamespaceSegment> for Namespace
Source§type Error = NamespaceError
type Error = NamespaceError
The type returned in the event of a conversion error.
impl Eq for Namespace
impl StructuralPartialEq for Namespace
Auto Trait Implementations§
impl Freeze for Namespace
impl RefUnwindSafe for Namespace
impl Send for Namespace
impl Sync for Namespace
impl Unpin for Namespace
impl UnwindSafe for Namespace
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more