Struct dbfs_client::DbfsClient
source · [−]pub struct DbfsClient { /* private fields */ }Expand description
DBFS Client
Implementations
sourceimpl DbfsClient
impl DbfsClient
sourcepub fn new(url_base: &str, token: &str) -> Self
pub fn new(url_base: &str, token: &str) -> Self
Create New DBFS Client
@param url_base: the base part of the DBFS endpoint, e.g. “https://adb-xxx.azuredatabricks.net” @param token: The Databricks API token
sourcepub fn read(&self, path: &str) -> Result<DbfsReadStream>
pub fn read(&self, path: &str) -> Result<DbfsReadStream>
Read DBFS file, returns AsyncRead + AsyncBufRead
sourcepub async fn write_file<T>(&self, path: &str, data: T) -> Result<()> where
T: AsRef<[u8]>,
pub async fn write_file<T>(&self, path: &str, data: T) -> Result<()> where
T: AsRef<[u8]>,
Write data to file, the existing content will be overwritten
sourcepub async fn upload_file<T>(
&self,
local_path: T,
remote_path: &str
) -> Result<String> where
T: AsRef<Path>,
pub async fn upload_file<T>(
&self,
local_path: T,
remote_path: &str
) -> Result<String> where
T: AsRef<Path>,
Upload a local file to DBFS
sourcepub async fn download_file<T>(
&self,
remote_path: &str,
local_path: T
) -> Result<PathBuf> where
T: AsRef<Path>,
pub async fn download_file<T>(
&self,
remote_path: &str,
local_path: T
) -> Result<PathBuf> where
T: AsRef<Path>,
Download DBFS file to local path
sourcepub async fn get_file_status(&self, path: &str) -> Result<FileStatus>
pub async fn get_file_status(&self, path: &str) -> Result<FileStatus>
Get DBFS file status
sourcepub async fn delete_file(&self, path: &str) -> Result<()>
pub async fn delete_file(&self, path: &str) -> Result<()>
Delete DBFS file
Trait Implementations
sourceimpl Clone for DbfsClient
impl Clone for DbfsClient
sourcefn clone(&self) -> DbfsClient
fn clone(&self) -> DbfsClient
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 more
Auto Trait Implementations
impl !RefUnwindSafe for DbfsClient
impl Send for DbfsClient
impl Sync for DbfsClient
impl Unpin for DbfsClient
impl !UnwindSafe for DbfsClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more