pub struct SymbolPathBuilder { /* private fields */ }Expand description
Builder for SymbolPath
§Validation Strategy
push(): No validation (performance)build(): Validate all segments at once (safety)
Implementations§
Source§impl SymbolPathBuilder
impl SymbolPathBuilder
Sourcepub fn push(self, name: impl AsRef<str>) -> SymbolPathBuilder
pub fn push(self, name: impl AsRef<str>) -> SymbolPathBuilder
Add a segment (no validation until build())
Sourcepub fn build(self) -> Result<SymbolPath, ParseError>
pub fn build(self) -> Result<SymbolPath, ParseError>
Build the SymbolPath (validates all segments)
§Errors
ParseError::Empty: No segmentsParseError::InvalidIdentifier: Invalid Rust identifier
Auto Trait Implementations§
impl Freeze for SymbolPathBuilder
impl RefUnwindSafe for SymbolPathBuilder
impl Send for SymbolPathBuilder
impl Sync for SymbolPathBuilder
impl Unpin for SymbolPathBuilder
impl UnsafeUnpin for SymbolPathBuilder
impl UnwindSafe for SymbolPathBuilder
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> 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