pub struct WorkspaceShape {
pub shape: Shape,
pub dimension: Option<String>,
}Expand description
Describe the shape of the workspace.
Fields§
§shape: ShapeAll actors accessing the workspace.
dimension: Option<String>Starting dimension in the shape denoting all ranks that share the same workspace.
Implementations§
Source§impl WorkspaceShape
impl WorkspaceShape
Sourcepub fn owners(&self) -> Result<Shape, ShapeError>
pub fn owners(&self) -> Result<Shape, ShapeError>
Reduce the shape to contain only the “owners” of the remote workspace
This is relevant when e.g. multiple worker on the same host share a workspace, in which case, we’ll reduce the share to only contain one worker per workspace, so that we don’t have multiple workers trying to sync to the same workspace at the same time.
Sourcepub fn downstream(&self, rank: usize) -> Result<Shape>
pub fn downstream(&self, rank: usize) -> Result<Shape>
Return a new shape that contains all ranks that share the same workspace with the given “owning” rank.
§Errors
Returns an error if the given rank’s coordinates aren’t all zero starting at the specified dimension and continuing until the end. For example, if the dimension is Some(“host”), then the coordinates for the rank must be 0 in the host dimension and all subsequent dimensions.
Trait Implementations§
Source§impl Clone for WorkspaceShape
impl Clone for WorkspaceShape
Source§fn clone(&self) -> WorkspaceShape
fn clone(&self) -> WorkspaceShape
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WorkspaceShape
impl Debug for WorkspaceShape
Source§impl<'de> Deserialize<'de> for WorkspaceShape
impl<'de> Deserialize<'de> for WorkspaceShape
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for WorkspaceShape
impl RefUnwindSafe for WorkspaceShape
impl Send for WorkspaceShape
impl Sync for WorkspaceShape
impl Unpin for WorkspaceShape
impl UnwindSafe for WorkspaceShape
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].