pub struct ModuleRequestSet { /* private fields */ }Expand description
A set of requests to generate code for a series of modules
Implementations§
Source§impl ModuleRequestSet
impl ModuleRequestSet
Sourcepub fn new<I>(
input_protos: I,
proto_file: Vec<FileDescriptorProto>,
raw_request: &[u8],
default_package_filename: Option<&str>,
flat_output_dir: bool,
) -> Result<Self, DecodeError>where
I: IntoIterator<Item = String>,
pub fn new<I>(
input_protos: I,
proto_file: Vec<FileDescriptorProto>,
raw_request: &[u8],
default_package_filename: Option<&str>,
flat_output_dir: bool,
) -> Result<Self, DecodeError>where
I: IntoIterator<Item = String>,
Construct a new module request set from an encoded CodeGeneratorRequest
Sourcepub fn requests(&self) -> impl Iterator<Item = (&Module, &ModuleRequest)>
pub fn requests(&self) -> impl Iterator<Item = (&Module, &ModuleRequest)>
An ordered iterator of all requests
Sourcepub fn for_module(&self, module: &Module) -> Option<&ModuleRequest>
pub fn for_module(&self, module: &Module) -> Option<&ModuleRequest>
Retrieve the request for the given module
pub fn modules(&self) -> impl Iterator<Item = &Module>
Auto Trait Implementations§
impl Freeze for ModuleRequestSet
impl RefUnwindSafe for ModuleRequestSet
impl Send for ModuleRequestSet
impl Sync for ModuleRequestSet
impl Unpin for ModuleRequestSet
impl UnsafeUnpin for ModuleRequestSet
impl UnwindSafe for ModuleRequestSet
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<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