Struct prost_build::Module
source · pub struct Module { /* private fields */ }
Expand description
A Rust module path for a Protobuf package.
Implementations§
source§impl Module
impl Module
sourcepub fn from_parts<I>(parts: I) -> Self
pub fn from_parts<I>(parts: I) -> Self
Construct a module path from an iterator of parts.
sourcepub fn from_protobuf_package_name(name: &str) -> Self
pub fn from_protobuf_package_name(name: &str) -> Self
Construct a module path from a Protobuf package name.
Constituent parts are automatically converted to snake case in order to follow Rust module naming conventions.
sourcepub fn to_file_name_or(&self, default: &str) -> String
pub fn to_file_name_or(&self, default: &str) -> String
Format the module path into a filename for generated Rust code.
If the module path is empty, default
is used to provide the root of the filename.
Trait Implementations§
source§impl Ord for Module
impl Ord for Module
source§impl PartialEq for Module
impl PartialEq for Module
source§impl PartialOrd for Module
impl PartialOrd for Module
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 Module
impl StructuralPartialEq for Module
Auto Trait Implementations§
impl Freeze for Module
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnwindSafe for Module
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more