pub struct ContainerNamespace { /* private fields */ }Implementations§
Source§impl ContainerNamespace
impl ContainerNamespace
pub fn new() -> Self
Sourcepub fn has_channel_entry(&self, channel_path: impl AsRef<Path>) -> bool
pub fn has_channel_entry(&self, channel_path: impl AsRef<Path>) -> bool
Returns a bool indicating whether this ContainerNamespace contains a channel entry corresponding to the given path.
Sourcepub fn get_namespace_channel(
&self,
channel_path: impl AsRef<Path>,
) -> Result<Channel, Error>
pub fn get_namespace_channel( &self, channel_path: impl AsRef<Path>, ) -> Result<Channel, Error>
Attempts to find a channel at the given namespace path.
Sourcepub fn find_closest_channel(
&self,
search_path: impl AsRef<Path>,
) -> Result<(Channel, String), Error>
pub fn find_closest_channel( &self, search_path: impl AsRef<Path>, ) -> Result<(Channel, String), Error>
Iterate backwards through the path ancestors, until we find a channel
which matches. This is needed since namespaces can be nested
(e.g. /foo/bar and /foo), so we should find the closest match to our
input query (e.g. /foo/bar/some should match /foo/bar). Returns the
namespace proxy which was found, and the remaining subdirectory paths.
For instance, if the input parameter is /foo/bar/test and we have a
namespace corresponding to /foo/bar, then this function will return
a proxy to /foo/bar and the remaining subdir /test.
Sourcepub fn try_clone(&self) -> Result<ContainerNamespace, Error>
pub fn try_clone(&self) -> Result<ContainerNamespace, Error>
Attempts to clone this ContainerNamespace, returning an error if the proxy cloning process failed.
Trait Implementations§
Source§impl Debug for ContainerNamespace
impl Debug for ContainerNamespace
Source§impl From<Vec<ComponentNamespaceEntry>> for ContainerNamespace
impl From<Vec<ComponentNamespaceEntry>> for ContainerNamespace
Source§fn from(namespace: Vec<ComponentNamespaceEntry>) -> Self
fn from(namespace: Vec<ComponentNamespaceEntry>) -> Self
Auto Trait Implementations§
impl Freeze for ContainerNamespace
impl RefUnwindSafe for ContainerNamespace
impl Send for ContainerNamespace
impl Sync for ContainerNamespace
impl Unpin for ContainerNamespace
impl UnwindSafe for ContainerNamespace
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [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>
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>
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