pub struct Attr {
pub code_page: Option<i32>,
pub time: Option<i32>,
pub random: Option<i32>,
pub color: Option<i32>,
pub size: Option<i32>,
pub effect: Option<i32>,
pub char_set: Option<i32>,
pub pitch_and_family: Option<i32>,
pub font_name: Option<String>,
pub reserve_data: Option<Vec<u8>>,
}
Fields§
§code_page: Option<i32>
§time: Option<i32>
§random: Option<i32>
§color: Option<i32>
§size: Option<i32>
§effect: Option<i32>
§char_set: Option<i32>
§pitch_and_family: Option<i32>
§font_name: Option<String>
§reserve_data: Option<Vec<u8>>
Implementations§
source§impl Attr
impl Attr
sourcepub fn code_page(&self) -> i32
pub fn code_page(&self) -> i32
Returns the value of code_page
, or the default value if code_page
is unset.
sourcepub fn random(&self) -> i32
pub fn random(&self) -> i32
Returns the value of random
, or the default value if random
is unset.
sourcepub fn effect(&self) -> i32
pub fn effect(&self) -> i32
Returns the value of effect
, or the default value if effect
is unset.
sourcepub fn char_set(&self) -> i32
pub fn char_set(&self) -> i32
Returns the value of char_set
, or the default value if char_set
is unset.
sourcepub fn pitch_and_family(&self) -> i32
pub fn pitch_and_family(&self) -> i32
Returns the value of pitch_and_family
, or the default value if pitch_and_family
is unset.
sourcepub fn font_name(&self) -> &str
pub fn font_name(&self) -> &str
Returns the value of font_name
, or the default value if font_name
is unset.
sourcepub fn reserve_data(&self) -> &[u8] ⓘ
pub fn reserve_data(&self) -> &[u8] ⓘ
Returns the value of reserve_data
, or the default value if reserve_data
is unset.
Trait Implementations§
source§impl Message for Attr
impl Message for Attr
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
. Read more