pub enum Locations {
All,
Restricted(Vec<Location>),
}
Expand description
Contains location restrictions for a certain node.
Variants§
All
All locations are allowed.
Restricted(Vec<Location>)
If not all, then the following locations are allowed as a whitelist.
Implementations§
source§impl Locations
impl Locations
sourcepub fn restricted(&self) -> &[Location]
pub fn restricted(&self) -> &[Location]
sourcepub fn is_restrictive(&self) -> bool
pub fn is_restrictive(&self) -> bool
Returns whether this Locations is a restrictive list.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Locations
impl<'de> Deserialize<'de> for Locations
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<AllowedLocations> for Locations
impl From<AllowedLocations> for Locations
source§fn from(value: AllowedLocations) -> Self
fn from(value: AllowedLocations) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Locations
impl RefUnwindSafe for Locations
impl Send for Locations
impl Sync for Locations
impl Unpin for Locations
impl UnwindSafe for Locations
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request