#[non_exhaustive]pub struct ServerKeyRestrictions {
pub allowed_ips: Vec<String>,
/* private fields */
}Expand description
The IP addresses of callers that are allowed to use the key.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.allowed_ips: Vec<String>A list of the caller IP addresses that are allowed to make API calls with this key.
Implementations§
Source§impl ServerKeyRestrictions
impl ServerKeyRestrictions
pub fn new() -> Self
Sourcepub fn set_allowed_ips<T, V>(self, v: T) -> Self
pub fn set_allowed_ips<T, V>(self, v: T) -> Self
Sets the value of allowed_ips.
§Example
ⓘ
let x = ServerKeyRestrictions::new().set_allowed_ips(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for ServerKeyRestrictions
impl Clone for ServerKeyRestrictions
Source§fn clone(&self) -> ServerKeyRestrictions
fn clone(&self) -> ServerKeyRestrictions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServerKeyRestrictions
impl Debug for ServerKeyRestrictions
Source§impl Default for ServerKeyRestrictions
impl Default for ServerKeyRestrictions
Source§fn default() -> ServerKeyRestrictions
fn default() -> ServerKeyRestrictions
Returns the “default value” for a type. Read more
Source§impl Message for ServerKeyRestrictions
impl Message for ServerKeyRestrictions
Source§impl PartialEq for ServerKeyRestrictions
impl PartialEq for ServerKeyRestrictions
impl StructuralPartialEq for ServerKeyRestrictions
Auto Trait Implementations§
impl Freeze for ServerKeyRestrictions
impl RefUnwindSafe for ServerKeyRestrictions
impl Send for ServerKeyRestrictions
impl Sync for ServerKeyRestrictions
impl Unpin for ServerKeyRestrictions
impl UnsafeUnpin for ServerKeyRestrictions
impl UnwindSafe for ServerKeyRestrictions
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