mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2025-12-26 17:02:24 +01:00
Merge pull request #465 from andrewbaxter/field-mask-pub-value
Make field mask inner public
This commit is contained in:
@@ -34,6 +34,14 @@ fn snakecase(source: &str) -> String {
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq)]
|
||||
pub struct FieldMask(Vec<String>);
|
||||
|
||||
impl FieldMask {
|
||||
/// Create a new `FieldMask` from a list of paths. These are converted to snake
|
||||
/// case if they aren't already.
|
||||
pub fn new<S: AsRef<str>>(values: &[S]) -> Self {
|
||||
return Self(values.iter().map(|s| snakecase(s.as_ref())).collect());
|
||||
}
|
||||
}
|
||||
|
||||
impl Serialize for FieldMask {
|
||||
fn serialize<S>(&self, s: S) -> Result<S::Ok, S::Error>
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user