Enum chunky_bits::file::Location [−][src]
Variants
Http(HttpUrl)
Local(PathBuf)
Implementations
impl Location
[src]
impl Location
[src]pub async fn read(&self) -> Result<Vec<u8>, LocationError>
[src]
pub async fn write<T>(&self, bytes: T) -> Result<(), LocationError> where
T: AsRef<[u8]> + Into<Vec<u8>>,
[src]
T: AsRef<[u8]> + Into<Vec<u8>>,
pub async fn write_subfile<T>(
&self,
name: &str,
bytes: T
) -> Result<Location, ShardError> where
T: AsRef<[u8]> + Into<Vec<u8>>,
[src]
&self,
name: &str,
bytes: T
) -> Result<Location, ShardError> where
T: AsRef<[u8]> + Into<Vec<u8>>,
pub async fn delete(&self) -> Result<(), LocationError>
[src]
pub async fn read_with_context(
&self,
cx: &LocationContext
) -> Result<Vec<u8>, LocationError>
[src]
&self,
cx: &LocationContext
) -> Result<Vec<u8>, LocationError>
pub async fn reader_with_context(
&self,
cx: &LocationContext
) -> Result<impl AsyncRead + Send + Unpin, LocationError>
[src]
&self,
cx: &LocationContext
) -> Result<impl AsyncRead + Send + Unpin, LocationError>
pub async fn write_with_context<T>(
&self,
cx: &LocationContext,
bytes: T
) -> Result<(), LocationError> where
T: AsRef<[u8]> + Into<Vec<u8>>,
[src]
&self,
cx: &LocationContext,
bytes: T
) -> Result<(), LocationError> where
T: AsRef<[u8]> + Into<Vec<u8>>,
pub async fn write_from_reader_with_context(
&self,
cx: &LocationContext,
reader: &mut impl AsyncRead + Unpin
) -> Result<u64, LocationError>
[src]
&self,
cx: &LocationContext,
reader: &mut impl AsyncRead + Unpin
) -> Result<u64, LocationError>
pub async fn write_subfile_with_context<T>(
&self,
cx: &LocationContext,
name: &str,
bytes: T
) -> Result<Location, ShardError> where
T: AsRef<[u8]> + Into<Vec<u8>>,
[src]
&self,
cx: &LocationContext,
name: &str,
bytes: T
) -> Result<Location, ShardError> where
T: AsRef<[u8]> + Into<Vec<u8>>,
pub async fn delete_with_context(
&self,
cx: &LocationContext
) -> Result<(), LocationError>
[src]
&self,
cx: &LocationContext
) -> Result<(), LocationError>
pub fn default_context() -> LocationContext
[src]
pub fn is_child_of(&self, other: &Location) -> bool
[src]
pub fn is_parent_of(&self, other: &Location) -> bool
[src]
Trait Implementations
impl<'de> Deserialize<'de> for Location
[src]
impl<'de> Deserialize<'de> for Location
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl PartialOrd<Location> for Location
[src]
impl PartialOrd<Location> for Location
[src]impl ShardWriter for Location
[src]
impl ShardWriter for Location
[src]fn write_shard<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
hash: &'life1 AnyHash,
bytes: &'life2 [u8]
) -> Pin<Box<dyn Future<Output = Result<Vec<Location>, ShardError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
hash: &'life1 AnyHash,
bytes: &'life2 [u8]
) -> Pin<Box<dyn Future<Output = Result<Vec<Location>, ShardError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
impl StructuralEq for Location
[src]
impl StructuralEq for Location
[src]impl StructuralPartialEq for Location
[src]
impl StructuralPartialEq for Location
[src]Auto Trait Implementations
impl RefUnwindSafe for Location
impl RefUnwindSafe for Location
impl UnwindSafe for Location
impl UnwindSafe for Location
Blanket Implementations
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,