pub struct Connection { /* private fields */ }Implementations§
Source§impl Connection
impl Connection
pub fn new( connection_str: &str, password: Option<&str>, ) -> Result<Self, Box<dyn Error>>
pub fn separator(&self) -> char
pub fn canonicalize(&self, path: &str) -> Result<String, Box<dyn Error>>
pub fn read(&self, path: &str) -> Result<Vec<u8>, Box<dyn Error>>
pub fn mkdirs(&self, path: &str) -> Result<(), Box<dyn Error>>
pub fn create(&self, path: &str) -> Result<(), Box<dyn Error>>
pub fn write(&self, path: &str, data: &[u8]) -> Result<(), Box<dyn Error>>
pub fn ls(&self, path: &str) -> Result<Vec<String>, Box<dyn Error>>
pub fn is_file(&self, path: &str) -> bool
pub fn is_dir(&self, path: &str) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Connection
impl !RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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