Struct kdl::KdlIdentifier
source · [−]pub struct KdlIdentifier { /* private fields */ }
Expand description
Represents a KDL Identifier.
Implementations
sourceimpl KdlIdentifier
impl KdlIdentifier
sourcepub fn set_value(&mut self, value: impl Into<String>)
pub fn set_value(&mut self, value: impl Into<String>)
Sets the string value for this identifier.
sourcepub fn span(&self) -> &SourceSpan
pub fn span(&self) -> &SourceSpan
Gets this identifier’s span.
This value will be properly initialized when created via [KdlDocument::parse
]
but may become invalidated if the document is mutated. We do not currently
guarantee this to yield any particularly consistent results at that point.
sourcepub fn span_mut(&mut self) -> &mut SourceSpan
pub fn span_mut(&mut self) -> &mut SourceSpan
Gets a mutable reference to this identifier’s span.
sourcepub fn set_span(&mut self, span: impl Into<SourceSpan>)
pub fn set_span(&mut self, span: impl Into<SourceSpan>)
Sets this identifier’s span.
sourcepub fn repr(&self) -> Option<&str>
pub fn repr(&self) -> Option<&str>
Gets the custom string representation for this identifier, if any.
sourcepub fn set_repr(&mut self, repr: impl Into<String>)
pub fn set_repr(&mut self, repr: impl Into<String>)
Sets a custom string representation for this identifier.
Trait Implementations
sourceimpl Clone for KdlIdentifier
impl Clone for KdlIdentifier
sourcefn clone(&self) -> KdlIdentifier
fn clone(&self) -> KdlIdentifier
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 moresourceimpl Debug for KdlIdentifier
impl Debug for KdlIdentifier
sourceimpl Display for KdlIdentifier
impl Display for KdlIdentifier
sourceimpl From<&str> for KdlIdentifier
impl From<&str> for KdlIdentifier
sourceimpl From<KdlIdentifier> for String
impl From<KdlIdentifier> for String
sourcefn from(value: KdlIdentifier) -> Self
fn from(value: KdlIdentifier) -> Self
Converts to this type from the input type.
sourceimpl From<String> for KdlIdentifier
impl From<String> for KdlIdentifier
sourceimpl FromStr for KdlIdentifier
impl FromStr for KdlIdentifier
sourceimpl Hash for KdlIdentifier
impl Hash for KdlIdentifier
sourceimpl PartialEq<KdlIdentifier> for KdlIdentifier
impl PartialEq<KdlIdentifier> for KdlIdentifier
impl Eq for KdlIdentifier
impl StructuralEq for KdlIdentifier
Auto Trait Implementations
impl RefUnwindSafe for KdlIdentifier
impl Send for KdlIdentifier
impl Sync for KdlIdentifier
impl Unpin for KdlIdentifier
impl UnwindSafe for KdlIdentifier
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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