pub struct Tag<'a, P = Utf8PathBuf>(/* private fields */);Implementations§
Source§impl<'a, P: AsRef<Utf8Path>> Tag<'a, P>
impl<'a, P: AsRef<Utf8Path>> Tag<'a, P>
pub fn node(&self, path: &TreePath) -> Node<'a, Utf8PathBuf>
pub async fn create_file_node( &self, path: &TreePath, meta: Meta, rdr: impl Unpin + AsyncRead, ) -> Result<Node<'a, Utf8PathBuf>, CreateError<Error>>
pub async fn create_directory_node( &self, path: &TreePath, meta: Meta, dir: &TreeDirectory<TreeEntry>, ) -> Result<Node<'a, Utf8PathBuf>, CreateError<Error>>
Methods from Deref<Target = Entity<'a, P>>§
Sourcepub fn child(&self, path: impl AsRef<Utf8Path>) -> Entity<'a, Utf8PathBuf>
pub fn child(&self, path: impl AsRef<Utf8Path>) -> Entity<'a, Utf8PathBuf>
Returns a child Entity rooted at path.
Sourcepub async fn get_content(&self) -> Result<impl '_ + AsyncRead, GetError<Error>>
pub async fn get_content(&self) -> Result<impl '_ + AsyncRead, GetError<Error>>
Returns contents of the entity as AsyncRead.
Sourcepub async fn read_content(&self) -> Result<Vec<u8>, GetError<Error>>
pub async fn read_content(&self) -> Result<Vec<u8>, GetError<Error>>
Reads contents of the entity.
Sourcepub async fn get_content_json<T>(&self) -> Result<T, GetError<Error>>where
for<'de> T: Deserialize<'de>,
pub async fn get_content_json<T>(&self) -> Result<T, GetError<Error>>where
for<'de> T: Deserialize<'de>,
Returns the contents of the entity as JSON.
Sourcepub async fn get(&self) -> Result<(Meta, impl '_ + AsyncRead), GetError<Error>>
pub async fn get(&self) -> Result<(Meta, impl '_ + AsyncRead), GetError<Error>>
Returns metadata of the entity and a reader of its contents.
Sourcepub async fn get_to_writer(
&self,
dst: &mut (impl Unpin + AsyncWrite),
) -> Result<Meta, GetToWriterError<Error>>
pub async fn get_to_writer( &self, dst: &mut (impl Unpin + AsyncWrite), ) -> Result<Meta, GetToWriterError<Error>>
Returns metadata of the entity and writes its contents into dst.
Trait Implementations§
impl<'a, P: Copy> Copy for Tag<'a, P>
Auto Trait Implementations§
impl<'a, P> Freeze for Tag<'a, P>where
P: Freeze,
impl<'a, P = Utf8PathBuf> !RefUnwindSafe for Tag<'a, P>
impl<'a, P> Send for Tag<'a, P>where
P: Send,
impl<'a, P> Sync for Tag<'a, P>where
P: Sync,
impl<'a, P> Unpin for Tag<'a, P>where
P: Unpin,
impl<'a, P = Utf8PathBuf> !UnwindSafe for Tag<'a, P>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more