pub struct DatabaseAlias(/* private fields */);Expand description
A validated alias for a store mounted via ATTACH DATABASE ... AS <alias> (or the CLI’s --attach PATH:ALIAS).
Normalizes to lowercase, since aliases are matched case-insensitively
like unquoted SQL identifiers, and rejects names that would collide with
the local store’s own namespace (main, blocks, documents).
DatabaseAlias::parse is the only constructor, so every attach path
gets the same validation instead of each call site re-implementing it.
Implementations§
Trait Implementations§
Source§impl Borrow<str> for DatabaseAlias
impl Borrow<str> for DatabaseAlias
Source§impl Clone for DatabaseAlias
impl Clone for DatabaseAlias
Source§fn clone(&self) -> DatabaseAlias
fn clone(&self) -> DatabaseAlias
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DatabaseAlias
impl Debug for DatabaseAlias
Source§impl Display for DatabaseAlias
impl Display for DatabaseAlias
impl Eq for DatabaseAlias
Source§impl Hash for DatabaseAlias
impl Hash for DatabaseAlias
Source§impl PartialEq for DatabaseAlias
impl PartialEq for DatabaseAlias
impl StructuralPartialEq for DatabaseAlias
Auto Trait Implementations§
impl Freeze for DatabaseAlias
impl RefUnwindSafe for DatabaseAlias
impl Send for DatabaseAlias
impl Sync for DatabaseAlias
impl Unpin for DatabaseAlias
impl UnsafeUnpin for DatabaseAlias
impl UnwindSafe for DatabaseAlias
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.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 moreimpl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more