pub struct ServerAssociation { /* private fields */ }
Expand description
A DICOM upper level association from the perspective of an accepting application entity.
The most common operations of an established association are
send
and receive
.
Sending large P-Data fragments may be easier through the P-Data sender
abstraction (see send_pdata
).
When the value falls out of scope, the program will shut down the underlying TCP connection.
Implementations§
Source§impl ServerAssociation
impl ServerAssociation
Sourcepub fn presentation_contexts(&self) -> &[PresentationContextResult]
pub fn presentation_contexts(&self) -> &[PresentationContextResult]
Obtain a view of the negotiated presentation contexts.
Sourcepub fn client_ae_title(&self) -> &str
pub fn client_ae_title(&self) -> &str
Obtain the remote DICOM node’s application entity title.
Sourcepub fn abort(self) -> Result<()>
pub fn abort(self) -> Result<()>
Send a provider initiated abort message and shut down the TCP connection, terminating the association.
Sourcepub fn send_pdata(
&mut self,
presentation_context_id: u8,
) -> PDataWriter<&mut TcpStream> ⓘ
pub fn send_pdata( &mut self, presentation_context_id: u8, ) -> PDataWriter<&mut TcpStream> ⓘ
Prepare a P-Data writer for sending one or more data item PDUs.
Returns a writer which automatically splits the inner data into separate PDUs if necessary.
Sourcepub fn receive_pdata(&mut self) -> PDataReader<&mut TcpStream> ⓘ
pub fn receive_pdata(&mut self) -> PDataReader<&mut TcpStream> ⓘ
Prepare a P-Data reader for receiving one or more data item PDUs.
Returns a reader which automatically receives more data PDUs once the bytes collected are consumed.
Sourcepub fn inner_stream(&mut self) -> &mut TcpStream
pub fn inner_stream(&mut self) -> &mut TcpStream
Obtain access to the inner TCP stream connected to the association acceptor.
This can be used to send the PDU in semantic fragments of the message, thus using less memory.
Note: reading and writing should be done with care
to avoid inconsistencies in the association state.
Do not call send
and receive
while not in a PDU boundary.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServerAssociation
impl RefUnwindSafe for ServerAssociation
impl Send for ServerAssociation
impl Sync for ServerAssociation
impl Unpin for ServerAssociation
impl UnwindSafe for ServerAssociation
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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