pub(crate) fn from_boundary<S>(boundary: String, stream: S) -> Multipart
    where
        S: Stream<Item = Result<Bytes, PayloadError>> + Unpin + 'static,
    {
        Multipart {
            error: None,
            safety: Safety::new(),
            inner: Some(Rc::new(RefCell::new(InnerMultipart {
                boundary,
                payload: PayloadRef::new(PayloadBuffer::new(Box::new(stream))),
                state: InnerState::FirstBoundary,
                item: InnerMultipartItem::None,
            }))),
        }
    }
/// Create multipart instance for given boundary and stream
Create multipart instance for given boundary and stream
Create multipart instance for given boundary and stream
pub(crate) fn from_boundary<S>(boundary: String, stream: S) -> Multipart
    where
        S: Stream<Item = Result<Bytes, PayloadError>> + Unpin + 'static,
    {
        Multipart {
            error: None,
            safety: Safety::new(),
            inner: Some(Rc::new(RefCell::new(InnerMultipart {
                boundary,
                payload: PayloadRef::new(PayloadBuffer::new(Box::new(stream))),
                state: InnerState::FirstBoundary,
                item: InnerMultipartItem::None,
            }))),
        }
    }
pub ( crate ) fn from_boundary < S > ( boundary : String , stream : S ) -> Multipart where S : Stream < Item = Result < Bytes , PayloadError > > + Unpin + ' static , { Multipart { error : None , safety : Safety :: new ( ) , inner : Some ( Rc :: new ( RefCell :: new ( InnerMultipart { boundary , payload : PayloadRef :: new ( PayloadBuffer :: new ( Box :: new ( stream ) ) ) , state : InnerState :: FirstBoundary , item : InnerMultipartItem :: None , } ) ) ) , } }
Create multipart instance for given boundary and stream
Create multipart instance for given boundary and stream
boundary
String
stream
S
boundary
String
stream
S