Lines Matching refs:new
209 /// Constructs a new `Frame` with the given `StreamId`, `FrameFlags`,
211 pub fn new(id: StreamId, flags: FrameFlags, payload: Payload) -> Self {
233 /// Creates a new `FrameFlags` instance with the given `flags` byte.
234 pub fn new(flags: u8) -> Self {
238 /// Creates a new `FrameFlags` instance with no flags set.
326 /// Creates a new Headers instance from the provided Parts.
327 pub fn new(parts: Parts) -> Self {
343 /// Creates a new Data instance containing the provided data.
344 pub fn new(data: Vec<u8>) -> Self {
360 /// Creates a new Settings instance containing the provided settings.
361 pub fn new(settings: Vec<Setting>) -> Self {
394 Frame::new(
396 FrameFlags::new(0x1),
397 Payload::Settings(Settings::new(vec![])),
418 pub fn new() -> Self {
459 /// let settings = SettingsBuilder::new()
466 Settings::new(self.settings)
472 Self::new()
477 /// Creates a new Goaway instance with the provided error code, last stream
479 pub fn new(error_code: u32, last_stream_id: StreamId, debug_data: Vec<u8>) -> Self {
510 /// Creates a new WindowUpdate instance with the provided window size
512 pub fn new(window_size_increment: u32) -> Self {
530 /// Creates a new Priority instance with the provided exclusive flag, stream
532 pub fn new(exclusive: bool, stream_dependency: u32, weight: u8) -> Self {
557 /// Creates a new RstStream instance with the provided error code.
558 pub fn new(error_code: u32) -> Self {
582 /// Creates a new Ping instance with the provided data.
583 pub fn new(data: [u8; 8]) -> Self {
594 Frame::new(0, FrameFlags::new(0x1), Payload::Ping(ping))
600 pub fn new(promised_stream_id: StreamId, parts: Parts) -> Self {
625 let settings = SettingsBuilder::new()
653 let ping = Ping::new(data);
698 let settings = Settings::new(settings_list.clone());
713 let payload_headers = Payload::Headers(Headers::new(Parts::new()));
717 let payload_data = Payload::Data(Data::new(b"hh".to_vec()));
721 let payload_priority = Payload::Priority(Priority::new(true, 1, 10));
725 let payload_rst_stream = Payload::RstStream(RstStream::new(20));
729 let payload_ping = Payload::Ping(Ping::new([0; 8]));
733 let payload_goaway = Payload::Goaway(Goaway::new(30, 20, vec![0; 0]));
737 let payload_window_update = Payload::WindowUpdate(WindowUpdate::new(1024));
741 let payload_push_promise = Payload::PushPromise(PushPromise::new(3, Parts::new()));