pub struct DatastoreRoute { /* private fields */ }Expand description
The route needed to send an application read or write.
Implementations§
Source§impl DatastoreRoute
impl DatastoreRoute
pub fn sqlite(path: impl Into<String>) -> Self
pub fn neon(endpoint: impl Into<String>, token: Option<String>) -> Self
pub fn datastore(&self) -> Datastore
pub fn route(&self) -> &str
pub fn token(&self) -> Option<&str>
Sourcepub fn from_env() -> Result<Self, DactylError>
pub fn from_env() -> Result<Self, DactylError>
Resolve the ambient route configuration.
DATASTORE is the sole selector. DATASTORE_ROUTE is required for
the selected backend, and DATASTORE_TOKEN is read only for Neon.
There is deliberately no implicit local fallback: a missing or empty
selector/route fails before an adapter is constructed.
Trait Implementations§
Source§impl Clone for DatastoreRoute
impl Clone for DatastoreRoute
Source§fn clone(&self) -> DatastoreRoute
fn clone(&self) -> DatastoreRoute
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 DatastoreRoute
impl Debug for DatastoreRoute
impl Eq for DatastoreRoute
Source§impl PartialEq for DatastoreRoute
impl PartialEq for DatastoreRoute
impl StructuralPartialEq for DatastoreRoute
Auto Trait Implementations§
impl Freeze for DatastoreRoute
impl RefUnwindSafe for DatastoreRoute
impl Send for DatastoreRoute
impl Sync for DatastoreRoute
impl Unpin for DatastoreRoute
impl UnsafeUnpin for DatastoreRoute
impl UnwindSafe for DatastoreRoute
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