Struct rerun::EntityPathPart
source · pub struct EntityPathPart(InternedString);
Expand description
The different parts that make up an EntityPath
.
A non-empty string.
Note that the contents of the string is NOT escaped,
so escaping needs to be done when printing this
using Self::escaped_string
.
Because of this, EntityPathPart
does NOT implement AsRef<str>
etc,
nor does it implement Display
: you must explicitly chose
either the escaped or the unescaped version of it.
In the file system analogy, this is the name of a folder.
Tuple Fields§
§0: InternedString
Implementations§
source§impl EntityPathPart
impl EntityPathPart
sourcepub fn new(unescaped_string: impl Into<InternedString>) -> EntityPathPart
pub fn new(unescaped_string: impl Into<InternedString>) -> EntityPathPart
The given string is expected to be unescaped, i.e. any \
is treated as a normal character.
sourcepub fn parse_forgiving(input: &str) -> EntityPathPart
pub fn parse_forgiving(input: &str) -> EntityPathPart
Unescape the string, forgiving any syntax error with a best-effort approach.
sourcepub fn parse_forgiving_with_warning(
input: &str,
warnings: Option<&mut Vec<String>>
) -> EntityPathPart
pub fn parse_forgiving_with_warning( input: &str, warnings: Option<&mut Vec<String>> ) -> EntityPathPart
Unescape the string, forgiving any syntax error with a best-effort approach.
Returns a warnings for potentially serious problems:
- any unknown escape sequences
- unescaped spaces
sourcepub fn parse_strict(input: &str) -> Result<EntityPathPart, PathParseError>
pub fn parse_strict(input: &str) -> Result<EntityPathPart, PathParseError>
Unescape the string, returning errors on wrongly escaped input.
sourcepub fn unescaped_str(&self) -> &str
pub fn unescaped_str(&self) -> &str
The unescaped string.
Use Self::escaped_string
to escape it.
Use this when it is standalone in a ui somewhere.
sourcepub fn escaped_string(&self) -> String
pub fn escaped_string(&self) -> String
Use this when it is part of a full entity path.
Trait Implementations§
source§impl Clone for EntityPathPart
impl Clone for EntityPathPart
source§fn clone(&self) -> EntityPathPart
fn clone(&self) -> EntityPathPart
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for EntityPathPart
impl Debug for EntityPathPart
source§impl<'de> Deserialize<'de> for EntityPathPart
impl<'de> Deserialize<'de> for EntityPathPart
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<EntityPathPart, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<EntityPathPart, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl From<&str> for EntityPathPart
impl From<&str> for EntityPathPart
source§fn from(part: &str) -> EntityPathPart
fn from(part: &str) -> EntityPathPart
source§impl From<InternedString> for EntityPathPart
impl From<InternedString> for EntityPathPart
source§fn from(part: InternedString) -> EntityPathPart
fn from(part: InternedString) -> EntityPathPart
source§impl From<String> for EntityPathPart
impl From<String> for EntityPathPart
source§fn from(part: String) -> EntityPathPart
fn from(part: String) -> EntityPathPart
source§impl FromIterator<EntityPathPart> for EntityPath
impl FromIterator<EntityPathPart> for EntityPath
source§fn from_iter<T>(parts: T) -> EntityPathwhere
T: IntoIterator<Item = EntityPathPart>,
fn from_iter<T>(parts: T) -> EntityPathwhere
T: IntoIterator<Item = EntityPathPart>,
source§impl Hash for EntityPathPart
impl Hash for EntityPathPart
source§impl Ord for EntityPathPart
impl Ord for EntityPathPart
source§fn cmp(&self, other: &EntityPathPart) -> Ordering
fn cmp(&self, other: &EntityPathPart) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for EntityPathPart
impl PartialEq for EntityPathPart
source§fn eq(&self, other: &EntityPathPart) -> bool
fn eq(&self, other: &EntityPathPart) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for EntityPathPart
impl PartialOrd for EntityPathPart
source§fn partial_cmp(&self, other: &EntityPathPart) -> Option<Ordering>
fn partial_cmp(&self, other: &EntityPathPart) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for EntityPathPart
impl Serialize for EntityPathPart
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl SyntaxHighlighting for EntityPathPart
impl SyntaxHighlighting for EntityPathPart
fn syntax_highlight_into(&self, style: &Style, job: &mut LayoutJob)
fn syntax_highlighted(&self, style: &Style) -> LayoutJob
impl Eq for EntityPathPart
impl StructuralPartialEq for EntityPathPart
Auto Trait Implementations§
impl Freeze for EntityPathPart
impl RefUnwindSafe for EntityPathPart
impl Send for EntityPathPart
impl Sync for EntityPathPart
impl Unpin for EntityPathPart
impl UnwindSafe for EntityPathPart
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
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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
§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
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> ⓘ
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> ⓘ
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 moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request