#[non_exhaustive]pub struct WeeklyWindow {
pub days_of_week: Vec<DayOfWeek>,
pub start_time: Option<TimeOfDay>,
pub end_time: Option<TimeOfDay>,
/* private fields */
}Expand description
Weekly windows. For example, blocking actions every Saturday and Sunday. Another example would be blocking actions every weekday from 5pm to midnight.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.days_of_week: Vec<DayOfWeek>Optional. Days of week. If left empty, all days of the week will be included.
start_time: Option<TimeOfDay>Optional. Start time (inclusive). Use 00:00 for the beginning of the day. If you specify start_time you must also specify end_time. If left empty, this will block for the entire day for the days specified in days_of_week.
end_time: Option<TimeOfDay>Optional. End time (exclusive). Use 24:00 to indicate midnight. If you specify end_time you must also specify start_time. If left empty, this will block for the entire day for the days specified in days_of_week.
Implementations§
Source§impl WeeklyWindow
impl WeeklyWindow
Sourcepub fn set_days_of_week<T, V>(self, v: T) -> Self
pub fn set_days_of_week<T, V>(self, v: T) -> Self
Sets the value of days_of_week.
§Example
use google_cloud_type::model::DayOfWeek;
let x = WeeklyWindow::new().set_days_of_week([
DayOfWeek::Monday,
DayOfWeek::Tuesday,
DayOfWeek::Wednesday,
]);Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sets the value of start_time.
§Example
use google_cloud_type::model::TimeOfDay;
let x = WeeklyWindow::new().set_start_time(TimeOfDay::default()/* use setters */);Sourcepub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time.
§Example
use google_cloud_type::model::TimeOfDay;
let x = WeeklyWindow::new().set_or_clear_start_time(Some(TimeOfDay::default()/* use setters */));
let x = WeeklyWindow::new().set_or_clear_start_time(None::<TimeOfDay>);Sourcepub fn set_end_time<T>(self, v: T) -> Self
pub fn set_end_time<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for WeeklyWindow
impl Clone for WeeklyWindow
Source§fn clone(&self) -> WeeklyWindow
fn clone(&self) -> WeeklyWindow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WeeklyWindow
impl Debug for WeeklyWindow
Source§impl Default for WeeklyWindow
impl Default for WeeklyWindow
Source§fn default() -> WeeklyWindow
fn default() -> WeeklyWindow
Source§impl Message for WeeklyWindow
impl Message for WeeklyWindow
Source§impl PartialEq for WeeklyWindow
impl PartialEq for WeeklyWindow
impl StructuralPartialEq for WeeklyWindow
Auto Trait Implementations§
impl Freeze for WeeklyWindow
impl RefUnwindSafe for WeeklyWindow
impl Send for WeeklyWindow
impl Sync for WeeklyWindow
impl Unpin for WeeklyWindow
impl UnsafeUnpin for WeeklyWindow
impl UnwindSafe for WeeklyWindow
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
T in a tonic::Request