Struct firestore_path::ProjectId
source · pub struct ProjectId(/* private fields */);
Expand description
A project id.
Limit
https://cloud.google.com/resource-manager/docs/creating-managing-projects
- Must be 6 to 30 characters in length.
- Can only contain lowercase letters, numbers, and hyphens.
- Must start with a letter.
- Cannot end with a hyphen.
- Cannot be in use or previously used; this includes deleted projects.
- Cannot contain restricted strings, such as google, null, undefined, and ssl.
Examples
use firestore_path::ProjectId;
use std::str::FromStr;
let project_id = ProjectId::from_str("my-project")?;
assert_eq!(project_id.as_ref(), "my-project");
assert_eq!(project_id.to_string(), "my-project");
Trait Implementations§
source§impl Ord for ProjectId
impl Ord for ProjectId
source§impl PartialEq for ProjectId
impl PartialEq for ProjectId
source§impl PartialOrd for ProjectId
impl PartialOrd for ProjectId
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for ProjectId
impl StructuralEq for ProjectId
impl StructuralPartialEq for ProjectId
Auto Trait Implementations§
impl RefUnwindSafe for ProjectId
impl Send for ProjectId
impl Sync for ProjectId
impl Unpin for ProjectId
impl UnwindSafe for ProjectId
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