Struct hadoop_proto::hadoop::hdfs::AddBlockRequestProto
source · pub struct AddBlockRequestProto {
pub src: String,
pub client_name: String,
pub previous: Option<ExtendedBlockProto>,
pub exclude_nodes: Vec<DatanodeInfoProto>,
pub file_id: Option<u64>,
pub favored_nodes: Vec<String>,
pub flags: Vec<i32>,
}Fields§
§src: String§client_name: String§previous: Option<ExtendedBlockProto>§exclude_nodes: Vec<DatanodeInfoProto>§file_id: Option<u64>default as a bogus id
favored_nodes: Vec<String>the set of datanodes to use for the block
flags: Vec<i32>default to empty.
Implementations§
source§impl AddBlockRequestProto
impl AddBlockRequestProto
sourcepub fn file_id(&self) -> u64
pub fn file_id(&self) -> u64
Returns the value of file_id, or the default value if file_id is unset.
sourcepub fn flags(
&self
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<AddBlockFlagProto>>
pub fn flags( &self ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<AddBlockFlagProto>>
Returns an iterator which yields the valid enum values contained in flags.
sourcepub fn push_flags(&mut self, value: AddBlockFlagProto)
pub fn push_flags(&mut self, value: AddBlockFlagProto)
Appends the provided enum value to flags.
Trait Implementations§
source§impl Clone for AddBlockRequestProto
impl Clone for AddBlockRequestProto
source§fn clone(&self) -> AddBlockRequestProto
fn clone(&self) -> AddBlockRequestProto
Returns a copy 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 AddBlockRequestProto
impl Debug for AddBlockRequestProto
source§impl Default for AddBlockRequestProto
impl Default for AddBlockRequestProto
source§impl Message for AddBlockRequestProto
impl Message for AddBlockRequestProto
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8, Global>where Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.source§impl PartialEq<AddBlockRequestProto> for AddBlockRequestProto
impl PartialEq<AddBlockRequestProto> for AddBlockRequestProto
source§fn eq(&self, other: &AddBlockRequestProto) -> bool
fn eq(&self, other: &AddBlockRequestProto) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for AddBlockRequestProto
Auto Trait Implementations§
impl RefUnwindSafe for AddBlockRequestProto
impl Send for AddBlockRequestProto
impl Sync for AddBlockRequestProto
impl Unpin for AddBlockRequestProto
impl UnwindSafe for AddBlockRequestProto
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